[haiku-bugs] Re: [Haiku] #13150: Some mp3 files fail to play on recent builds

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Fri, 10 Feb 2017 21:37:37 -0000

#13150: Some mp3 files fail to play on recent builds
------------------------------------+----------------------------
   Reporter:  vidrep                |      Owner:  pulkomandy
       Type:  bug                   |     Status:  new
   Priority:  high                  |  Milestone:  R1/beta1
  Component:  Audio & Video/Codecs  |    Version:  R1/Development
 Resolution:                        |   Keywords:
 Blocked By:                        |   Blocking:
Has a Patch:  0                     |   Platform:  All
------------------------------------+----------------------------

Comment (by pulkomandy):

 Problem tracked to here:
 http://cgit.haiku-os.org/haiku/tree/src/add-
 ons/media/plugins/ffmpeg/AVFormatReader.cpp#n260

 We currently give ".mod" as a file name to ffmpeg when opening anything.
 This allows playing amiga MOD files, which ffmpeg doesn't have a better
 way to detect than the file extension. However, now MP3s are also detected
 as MOD files and played with libmodplug, which has no idea how to handle
 them.

 I tried setting the parameter back to NULL, but then ffmpeg does not
 detect any format at all and nothing is played.

 Setting it to ".mp3", the decoding works fine again.

 So, for things to work properly in as much formats as possible, we should
 get either the MIME type or the file name to this function. Unfortunately,
 we only get a BDataIO at that level. We can cast it to a BFile, but that
 still doesn't get us to the filename, we would need a BEntry. An
 alternative is to sniff the data to try to detect the file type.

--
Ticket URL: <https://dev.haiku-os.org/ticket/13150#comment:6>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: