[vlc-commits] commit: AVFormat Demuxer : Set fourcc based on source container. ( Jai Menon )

git at videolan.org git at videolan.org
Thu Jun 24 13:54:09 CEST 2010


vlc | branch: master | Jai Menon <jmenon86 at gmail.com> | Sun Jun 20 22:26:23 2010 +0530| [80308100199f289184e07fb0ad27839d8dfbf686] | committer: Jean-Baptiste Kempf 

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 <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=80308100199f289184e07fb0ad27839d8dfbf686
---

 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..757f353 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;



More information about the vlc-commits mailing list