]> git.sesse.net Git - vlc/commitdiff
AVFormat Demuxer : Set fourcc based on source container.
authorJai Menon <jmenon86@gmail.com>
Sun, 20 Jun 2010 16:38:23 +0000 (22:08 +0530)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 24 Jun 2010 11:53:56 +0000 (13:53 +0200)
This is required for those containers which mux the
AVCDecoderConfigurationRecord as private/extra data
so that the AVC packetizer works correctly.

This should close #2850

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/avformat/demux.c

index 98d857cbbfb2d3030f2ac54c7f1b89be43b47957..757f353d22d10ade42cd4188bff2b20447927d74 100644 (file)
@@ -272,6 +272,10 @@ int OpenDemux( vlc_object_t *p_this )
                 else
                     fmt.i_codec = fmt.video.i_chroma;
             }
+            /* We need this for the h264 packetizer */
+            else 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' );
 
             fmt.video.i_width = cc->width;
             fmt.video.i_height = cc->height;