[vlc-devel] [PATCH 2/2] AVFormat Demuxer : Set fourcc based on source container.

Jai Menon jmenon86 at gmail.com
Sun Jun 20 18:38:23 CEST 2010


This is required for those containers which mux the
AVCDecoderConfigurationRecord as private/extra data
so that the AVC packetizer works correctly.
---
 modules/demux/avformat/demux.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 98d857c..eaeca80 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -283,6 +283,10 @@ int OpenDemux( vlc_object_t *p_this )
             psz_type = "video";
             fmt.video.i_frame_rate = cc->time_base.den;
             fmt.video.i_frame_rate_base = cc->time_base.num;
+            if( cc->codec_id == CODEC_ID_H264 && ( !strcmp( p_sys->fmt->name, "flv" ) ||
+                !strcmp( p_sys->fmt->name, "matroska" ) || !strcmp( p_sys->fmt->name, "mp4" ) ) )
+                fmt.i_original_fourcc = VLC_FOURCC( 'a', 'v', 'c', '1' );
+
             break;
 
         case CODEC_TYPE_SUBTITLE:
-- 
1.7.1




More information about the vlc-devel mailing list