Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#495 closed defect (fixed)

Crash on hidef WMV file

Reported by: DonMoir Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: wmapro
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I am getting a crash in avcodec on a particular wmv file. The file is 123MB and I think likely any effort to make a cut will not produce the crash. This file will not play anywhere but ffmpeg attempts to play it. Mostly, I would like to be able to detect an indication that this is a bad file but not seeing how to do that at present since everything appears to open and initialize fine.

ffplay will play it to point of crash. Same thing in my own app. Let me know how I should best proceed from here. Since the following indicates that decoding will likely fail, is there an error set that I can pick up and use ?

libavutil 51. 16. 1 / 51. 16. 1
libavcodec 53. 16. 0 / 53. 16. 0
libavformat 53. 12. 0 / 53. 12. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 43. 2 / 2. 43. 2
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0

[asf @ 00039DE0] Format asf probed with size=2048 and score=100
[asf @ 00039DE0] gpos mismatch our pos=24, end=302
[asf @ 00039DE0] gpos mismatch our pos=24, end=38
[asf @ 00039DE0] Ext DRM protected stream detected, decoding will likely fail!
[asf @ 00039DE0] gpos mismatch our pos=24, end=868
[asf @ 00039DE0] DRM protected stream detected, decoding will likely fail!
[asf @ 00039DE0] gpos mismatch our pos=24, end=124
[asf @ 00039DE0] Digital signature detected, decoding will likely fail!

Attachments (1)

crash.asf (1.0 MB ) - added by Carl Eugen Hoyos 12 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 by DonMoir, 12 years ago

I can upload the entire file to our server if you want.

comment:2 by Carl Eugen Hoyos, 12 years ago

Please read http://ffmpeg.org/bugreports.html - samples <100MB can be uploaded to http://www.datafilehost.com/ (we currently have no incoming directory).

comment:3 by DonMoir, 12 years ago

I cut the file down to about 20MB (hidef_crash_cut.wmv) and uploaded it to data host here:

http://www.datafilehost.com/download-3cd0d3f7.html

It still crashes but a little different. That is, ffplay crashes soon after start now with the cut version. My own app crashes in avcodec toward the end.

The original file can be found here:

http://sms.pangolin.com/temp/hidef.wmv

comment:4 by DonMoir, 12 years ago

This is a bad file and I don't care about it's display. Just that it crashes and best thing would be to have a failure on startup that could be detected. But it's also ok if it plays junk as long as it doesn't crash.

in reply to:  3 comment:5 by Carl Eugen Hoyos, 12 years ago

Replying to DonMoir:

http://www.datafilehost.com/download-3cd0d3f7.html

It still crashes but a little different. That is, ffplay crashes soon after start now with the cut version. My own app crashes in avcodec toward the end.

Then please provide a backtrace as explained on http://ffmpeg.org/bugreports.html

comment:6 by Carl Eugen Hoyos, 12 years ago

Component: undeterminedavcodec
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

comment:7 by DonMoir, 12 years ago

Sorry, I don't currently have a debug version of ffmpeg for windows. I spent some time trying to get it to build and will get back to it soon. I moved forward and used the provided libraries at http://ffmpeg.zeranoe.com/builds/ for the time being to see if ffmpeg was going to meet our needs. In the meantime, the provided sample should be a quick download for you. I tried to get it smaller but then it no longer crashed.

comment:8 by Carl Eugen Hoyos, 12 years ago

Resolution: fixed
Status: openclosed

Fixed by Sascha Sommer.

(Regarding some original questions: Attached 1MB cut of the original sample crashed with the same backtrace iirc and FFmpeg explains clearly why the sample cannot be decoded.)

by Carl Eugen Hoyos, 12 years ago

Attachment: crash.asf added

comment:9 by DonMoir, 12 years ago

I do believe ffmpeg describes why the sample cannot be decoded via console strings, but I not sure if the failure information is available by other means when doing av_open_input_file and subsequent startup, but it may be.

comment:10 by Carl Eugen Hoyos, 12 years ago

Please open an enhancement ticket (or even better, send a patch to ffmpeg-devel) for signalling encrypted formats to the calling application. (AVStream.is_encrypted ?)

(Since crashes are important, I'd like not to change this ticket's title.)

comment:11 by DonMoir, 12 years ago

As of 10-13-2011 zeranoe build, ffplay still crashes on hidef_crash_cut.wmv but not crash.asf. hidef_crash_cut.wmv is here:

http://www.datafilehost.com/download-3cd0d3f7.html

On ffmpeg-HEAD-2eaa553.tar.gz which I assume is the latest source, and one I just built, I still get a crash on hidef_crash_cut.wmv in my own app. I did not build ffplay. 2eaa553 was retrieved and built on 10-16-2011

Last edited 12 years ago by DonMoir (previous) (diff)

comment:12 by Carl Eugen Hoyos, 12 years ago

Keywords: wmapro added

Please open a new ticket for this completely unrelated crash, please do not forget a backtrace as explained on http://ffmpeg.org/bugreports.html

comment:13 by DonMoir, 12 years ago

What do you mean "completely unrelated" ?? It's exactly the same thing as originally reported with the files I uploaded. geeze

in reply to:  13 ; comment:14 by Carl Eugen Hoyos, 12 years ago

Replying to DonMoir:

What do you mean "completely unrelated" ?? It's exactly the same thing as originally reported with the files I uploaded. geeze

With an old version of ffmpeg, the crash happens when decoding audio, the remaining (unrelated) crash happens when decoding video.

Please open a new ticket for this unrelated crash, please do not forget to add backtrace etc. as explained on http://ffmpeg.org/bugreports.html

comment:15 by DonMoir, 12 years ago

Crash is same to me as originally reported. It was not specified whether it was audio or otherwise that caused the crash. So I can't tell you if it still crashes in the same apparent way or what. All I know is it's exactly the same apparent crash as before. I have already spent many hours on this uploading, testing, trying to get flags so we know when a file is encrypted etc. Rather than open a new ticket, since this is in the same realm with the orignal files etc, just reopen this ticket if you are interested in it being fixed.

By the way, I have tested various builds since this ticket was closed and have never noticed any difference in the crash. If there was a crash in the audio, were the files actually tested that I uploaded as a cross check or just the crash.asf ?

Last edited 12 years ago by DonMoir (previous) (diff)

in reply to:  14 comment:16 by Carl Eugen Hoyos, 12 years ago

Replying to cehoyos:

Replying to DonMoir:

What do you mean "completely unrelated" ?? It's exactly the same thing as originally reported with the files I uploaded. geeze

With an old version of ffmpeg, the crash happens when decoding audio, the remaining (unrelated) crash happens when decoding video.

To clarify: I can of course only test where crashes happen on my system. It is very likely that your system is different, and since you did not post a backtrace there is no indication whatsoever that would tell me where it crashes for you...

comment:17 by DonMoir, 12 years ago

Well yes if you have tested the hidef_crash_cut.wmv at http://www.datafilehost.com/download-3cd0d3f7.html and it does not crash for you, then you have a good point. Please verify that you have tested this file and if it does or does not crash for you. If it does not crash for you, I will be happy to provide the information you requested.

Last edited 12 years ago by DonMoir (previous) (diff)

comment:18 by reimar, 12 years ago

Doesn't crash for me at least (64 bit, current FFmpeg git, Linux).

comment:19 by DonMoir, 12 years ago

Does not crash for me anymore either. This file is marked as encrypted/protected and so useful in that sense.

AVDictionaryEntry* pEntry = av_dict_get (pFormatCtx->metadata,"encryption",NULL,0);

For the above file, pEntry will be valid.

The other protected type is:

AVDictionaryEntry* pEntry = av_dict_get (pFormatCtx->metadata,"ASF_Protection_Type",NULL,0);

In either of the above 2 cases, decoding is likely to fail, but no crash anymore. I currently reject files if either "encryption" or "ASF_Protection_Type" are detected but removed the check to test for crash.

Note: See TracTickets for help on using tickets.