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

  • From: "ttcoder" <trac@xxxxxxxxxxxx>
  • Date: Wed, 06 Nov 2013 15:40:39 -0000

#10176: BMediaFile crashes within AVFormatReader::Sniff() if it cannot handle 
the
file
----------------------------------+------------------------------
 Reporter:  ttcoder               |        Owner:  nobody
     Type:  bug                   |       Status:  new
 Priority:  normal                |    Milestone:  R1
Component:  Audio & Video/Codecs  |      Version:  R1/Development
 Keywords:  ffmpeg                |   Blocked By:
 Blocking:                        |  Has a Patch:  0
 Platform:  All                   |
----------------------------------+------------------------------
 If a file is not audio, or is an mp3 with embedded artwork (JFIF/JPEG) in
 it, BMediaFile crashes. First seen in our own audio app, though the crash
 is easily reproduced with MediaPlayer as well.

 Seems to have been there a long time: the crash occurs in PM builds but
 also in old hrev45824; though I didn't find a prior ticket that matches:
 #6595 is a crash that occurs in the dtor due to post-Open() init, whereas
 this crash occurs even before Open() is ever called.

 We can workaround the non-audio file case easily; we can also probably
 workaround the embedded art case by loading the file in memory and
 scanning for 'JFIF' before passing it to BMediaFile but that's of course
 very hackish. And this will only fix it for us, not for MediaPlayer.

 Attaching backtrace...

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

Other related posts: