From 80308100199f289184e07fb0ad27839d8dfbf686 Mon Sep 17 00:00:00 2001 From: Jai Menon Date: Sun, 20 Jun 2010 22:08:23 +0530 Subject: [PATCH] AVFormat Demuxer : Set fourcc based on source container. 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 --- modules/demux/avformat/demux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c index 98d857cbbf..757f353d22 100644 --- a/modules/demux/avformat/demux.c +++ b/modules/demux/avformat/demux.c @@ -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; -- 2.39.2