[vlc-devel] [PATCH 06/15] avformat demux: don't access removed info

KO Myung-Hun komh78 at gmail.com
Fri Mar 2 16:03:03 CET 2012


From: Rafaël Carré <funman at videolan.org>

Palette data is now transmitted as a side data in AVPacket
(cherry picked from commit 4ca6ef05e16554c71c7480a7b4df59ab3a43f6c4)

Signed-off-by: KO Myung-Hun <komh at chollian.net>
---
 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 0fed02d..6c492c8 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -302,11 +302,15 @@ int OpenDemux( vlc_object_t *p_this )
 
             fmt.video.i_width = cc->width;
             fmt.video.i_height = cc->height;
+#if LIBAVCODEC_VERSION_MAJOR < 54
             if( cc->palctrl )
             {
                 fmt.video.p_palette = malloc( sizeof(video_palette_t) );
                 *fmt.video.p_palette = *(video_palette_t *)cc->palctrl;
             }
+#else
+# warning FIXME: implement palette transmission
+#endif
             psz_type = "video";
             fmt.video.i_frame_rate = cc->time_base.den;
             fmt.video.i_frame_rate_base = cc->time_base.num * __MAX( cc->ticks_per_frame, 1 );
-- 
1.7.3.2




More information about the vlc-devel mailing list