[haiku-bugs] [Haiku] #6372: [patch] Support H264 codec in Flash Video container in ffmpeg plugin

#6372: [patch] Support H264 codec in Flash Video container in ffmpeg plugin
-------------------------+--------------------------------------------------
   Reporter:  Adek336    |        Owner:  nobody   
       Type:  bug        |       Status:  new      
   Priority:  normal     |    Milestone:  R1       
  Component:  - General  |      Version:  R1/alpha2
   Keywords:             |   Blocked By:           
Has a Patch:  0          |     Platform:  All      
   Blocking:             |  
-------------------------+--------------------------------------------------
 I propose the following patch, based on changeset r31605, I think it
 works, please review:

 {{{
 Index: src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp
 ===================================================================
 --- src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp (wersja 37534)
 +++ src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp (kopia robocza)
 @@ -480,7 +480,7 @@
                                 break;
                 }
                 TRACE("  codecTag '%.4s' or %ld\n", (char*)&codecTag,
 codecTag);
 -               TRACE("  fourcc '%.4s'\n",
 (char*)&codecContext->codec_id);
 +               TRACE("  fourcc '%.4s' or %d\n",
 (char*)&codecContext->codec_id, codecContext->codec_id);

                 BMediaFormats formats;
                 status_t status = formats.GetFormatFor(description,
 format);
 Index: src/add-ons/media/plugins/ffmpeg/CodecTable.cpp
 ===================================================================
 --- src/add-ons/media/plugins/ffmpeg/CodecTable.cpp     (wersja 37534)
 +++ src/add-ons/media/plugins/ffmpeg/CodecTable.cpp     (kopia robocza)
 @@ -92,6 +92,7 @@
         {CODEC_ID_H264,         B_MEDIA_ENCODED_VIDEO,
 B_AVI_FORMAT_FAMILY,    FOURCC('h264'), "H264"},
         {CODEC_ID_H264,         B_MEDIA_ENCODED_VIDEO,
 B_AVI_FORMAT_FAMILY,    FOURCC('H264'), "H264"},
         {CODEC_ID_H264,         B_MEDIA_ENCODED_VIDEO,
 B_AVI_FORMAT_FAMILY,    FOURCC('x264'), "H264"},
 +       {CODEC_ID_H264,         B_MEDIA_ENCODED_VIDEO,
 B_QUICKTIME_FORMAT_FAMILY,      FOURCC('h264'), "H264"},
         {CODEC_ID_H264,         B_MEDIA_ENCODED_VIDEO,
 B_QUICKTIME_FORMAT_FAMILY,      'avc1', "AVC"}, /* MPEG-4 AVC */
         {CODEC_ID_H264,         B_MEDIA_ENCODED_VIDEO,
 B_AVI_FORMAT_FAMILY,    'VMDH', "AVC"}, /* MPEG-4 AVC */
 }}}

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

Other related posts: