[haiku-commits] haiku: hrev48071 - in src: data/mime_db/audio add-ons/media/plugins/ffmpeg

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 22 Oct 2014 17:27:52 +0200 (CEST)

hrev48071 adds 2 changesets to branch 'master'
old head: 72d47357123aea91f5f780710998bd996b1cc8ca
new head: 377c5aecf01baba11af910c37c753aa445be181b
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=377c5ae+%5E72d4735

----------------------------------------------------------------------------

1560410: AIFF mimetype: fix sniffing rule.
  
  AIFF files follow EA IFF spec and start with a FORM chunk. They never
  start with AIFF or AIFC directly.
  
  See for example:
  http://www.onicos.com/staff/iz/formats/aiff.html
  http://paulbourke.net/dataformats/audio/

377c5ae: Fix AIFF decoding with ffmpeg.
  
  AIFF files are little endian. ffmpeg detects this just fine, but we
  overwrote the endianness in the decoded format info with
  B_MEDIA_HOST_ENDIAN right after setting it.
  
  Now we can decode both AIFF and WAV files just fine.
  
  Fixes #7047.

                                 [ Adrien Destugues <pulkomandy@xxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 1 insertion(+), 3 deletions(-)
src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp | 2 --
src/data/mime_db/audio/x-aiff                       | 2 +-

############################################################################

Commit:      1560410ff46d7332eead358b3db82942a97c757d
URL:         http://cgit.haiku-os.org/haiku/commit/?id=1560410
Author:      Adrien Destugues <pulkomandy@xxxxxxxxx>
Date:        Wed Oct 22 13:50:10 2014 UTC

AIFF mimetype: fix sniffing rule.

AIFF files follow EA IFF spec and start with a FORM chunk. They never
start with AIFF or AIFC directly.

See for example:
http://www.onicos.com/staff/iz/formats/aiff.html
http://paulbourke.net/dataformats/audio/

----------------------------------------------------------------------------

diff --git a/src/data/mime_db/audio/x-aiff b/src/data/mime_db/audio/x-aiff
index 2063383..41e1f30 100644
--- a/src/data/mime_db/audio/x-aiff
+++ b/src/data/mime_db/audio/x-aiff
@@ -12,4 +12,4 @@ resource(3, "META:EXTENS") message(234) {
        "type" = "audio/x-aiff"
 };
 
-resource(5, "META:SNIFF_RULE") "0.50 (\"AIFF\" | \"AIFC\")";
+resource(5, "META:SNIFF_RULE") "0.50 (\"FORM\") [8](\"AIFF\" | \"AIFC\") ";

############################################################################

Revision:    hrev48071
Commit:      377c5aecf01baba11af910c37c753aa445be181b
URL:         http://cgit.haiku-os.org/haiku/commit/?id=377c5ae
Author:      Adrien Destugues <pulkomandy@xxxxxxxxx>
Date:        Wed Oct 22 15:26:18 2014 UTC

Ticket:      https://dev.haiku-os.org/ticket/7047

Fix AIFF decoding with ffmpeg.

AIFF files are little endian. ffmpeg detects this just fine, but we
overwrote the endianness in the decoded format info with
B_MEDIA_HOST_ENDIAN right after setting it.

Now we can decode both AIFF and WAV files just fine.

Fixes #7047.

----------------------------------------------------------------------------

diff --git a/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp 
b/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp
index c9f1416..f4b79b4 100644
--- a/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp
+++ b/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp
@@ -1070,8 +1070,6 @@ AVFormatReader::Stream::Init(int32 virtualIndex)
                        format->u.raw_audio.frame_rate = 
(float)codecContext->sample_rate;
                        format->u.raw_audio.channel_count = 
codecContext->channels;
                        format->u.raw_audio.channel_mask = 
codecContext->channel_layout;
-                       format->u.raw_audio.byte_order
-                               = 
avformat_to_beos_byte_order(codecContext->sample_fmt);
                        
ConvertAVSampleFormatToRawAudioFormat(codecContext->sample_fmt,
                                format->u.raw_audio.format);
                        format->u.raw_audio.buffer_size = 0;


Other related posts:

  • » [haiku-commits] haiku: hrev48071 - in src: data/mime_db/audio add-ons/media/plugins/ffmpeg - pulkomandy