From: Rafaël Carré Date: Mon, 20 Aug 2007 17:13:54 +0000 (+0000) Subject: Call "meta reader" module in ffmpeg demuxer X-Git-Tag: 0.9.0-test0~6317 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=98c25e985f6541fb3d18ee37194af48861773150;p=vlc Call "meta reader" module in ffmpeg demuxer --- diff --git a/modules/codec/ffmpeg/demux.c b/modules/codec/ffmpeg/demux.c index 51a654263b..4520327dbe 100644 --- a/modules/codec/ffmpeg/demux.c +++ b/modules/codec/ffmpeg/demux.c @@ -30,7 +30,8 @@ #include #include #include -#include "vlc_meta.h" +#include +#include /* ffmpeg header */ #ifdef HAVE_FFMPEG_AVFORMAT_H @@ -256,6 +257,22 @@ int E_(OpenDemux)( vlc_object_t *p_this ) ( p_sys->ic->duration != (int64_t)AV_NOPTS_VALUE ) ? p_sys->ic->duration * 1000000 / AV_TIME_BASE : -1 ); + input_thread_t *p_input = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT ); + if( p_input ) + { + module_t *p_meta = module_Need( p_demux, "meta reader", NULL, 0 ); + if( p_meta ) + { + vlc_meta_Merge( input_GetItem(p_input)->p_meta, (vlc_meta_t*)(p_demux->p_private ) ); + module_Unneed( p_demux, p_meta ); + } + vlc_object_release( p_input ); + return VLC_SUCCESS; + } + if( p_input ) + vlc_object_release( p_input ); + + return VLC_SUCCESS; }