[haiku-bugs] Re: [Haiku] #10176: BMediaFile crashes within AVFormatReader::Sniff() if it cannot handle the file

  • From: "ttcoder" <trac@xxxxxxxxxxxx>
  • Date: Wed, 06 Nov 2013 16:01:42 -0000

#10176: BMediaFile crashes within AVFormatReader::Sniff() if it cannot handle 
the
file
------------------------------------+----------------------------
   Reporter:  ttcoder               |      Owner:  stippi
       Type:  bug                   |     Status:  assigned
   Priority:  normal                |  Milestone:  R1
  Component:  Audio & Video/Codecs  |    Version:  R1/Development
 Resolution:                        |   Keywords:  ffmpeg
 Blocked By:                        |   Blocking:
Has a Patch:  0                     |   Platform:  All
------------------------------------+----------------------------

Comment (by ttcoder):

 MediaPlayer masks most of the problem (but not the embedded art crash)
 since it filters files on their MIME type. I'm not anxious to upload an
 example file with embedded art as the one I have is 9 MB; but reproducing
 this bug with MediaPlayer is doable though it needs a bit of work:

 {{{
 cp myvalid_audio_file.mp3 foo.mp3
 > foo.mp3  #this bash redirect will reset foo's size to 0 bytes, which is
 a valid case to trigger the crash
 MediaPlayer foo.mp3
 }}}

 I would have done it with {{{touch}}} and {{{addatr BEOS:TYPE audio/mpeg
 <file>}}} except it does not work, as addattr adds a {{{CSTR}}} whereas it
 needs to be a {{{MIMS}}}... But the above works with the right preparation
 anyway.

--
Ticket URL: <http://dev.haiku-os.org/ticket/10176#comment:2>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: