Opened 5 years ago

Closed 5 years ago

Last modified 5 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 cehoyos 5 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 5 years ago by DonMoir

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

comment:2 Changed 5 years ago by cehoyos

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 follow-up: Changed 5 years ago by DonMoir

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 Changed 5 years ago by DonMoir

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.

comment:5 in reply to: ↑ 3 Changed 5 years ago by cehoyos

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 Changed 5 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

comment:7 Changed 5 years ago by DonMoir

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 Changed 5 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

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.)

Changed 5 years ago by cehoyos

comment:9 Changed 5 years ago by DonMoir

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 Changed 5 years ago by cehoyos

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 Changed 5 years ago by DonMoir

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 5 years ago by DonMoir (previous) (diff)

comment:12 Changed 5 years ago by cehoyos

  • 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 follow-up: Changed 5 years ago by DonMoir

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

comment:14 in reply to: ↑ 13 ; follow-up: Changed 5 years ago by 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.

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 Changed 5 years ago by DonMoir

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 5 years ago by DonMoir (previous) (diff)

comment:16 in reply to: ↑ 14 Changed 5 years ago by cehoyos

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 Changed 5 years ago by DonMoir

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 5 years ago by DonMoir (previous) (diff)

comment:18 Changed 5 years ago by reimar

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

comment:19 Changed 5 years ago by DonMoir

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.