Commit c434cdb2 authored by Rafaël Carré's avatar Rafaël Carré

avformat: AVMetadataTag and av_metadata_get don't exist anymore

They were copied verbatim to AVDictionary equivalents some time ago
(cherry picked from commit 55c0636c)
Signed-off-by: default avatarKO Myung-Hun <komh@chollian.net>
Signed-off-by: default avatarRafaël Carré <funman@videolan.org>
parent 91bfde6d
...@@ -46,6 +46,13 @@ ...@@ -46,6 +46,13 @@
#include "../xiph.h" #include "../xiph.h"
#include "../vobsub.h" #include "../vobsub.h"
/* Support for deprecated APIs */
#if LIBAVFORMAT_VERSION_MAJOR < 54
# define AVDictionaryEntry AVMetadataTag
# define av_dict_get av_metadata_get
#endif
//#define AVFORMAT_DEBUG 1 //#define AVFORMAT_DEBUG 1
/* Version checking */ /* Version checking */
...@@ -362,7 +369,7 @@ int OpenDemux( vlc_object_t *p_this ) ...@@ -362,7 +369,7 @@ int OpenDemux( vlc_object_t *p_this )
psz_type = "attachment"; psz_type = "attachment";
if( cc->codec_id == CODEC_ID_TTF ) if( cc->codec_id == CODEC_ID_TTF )
{ {
AVMetadataTag *filename = av_metadata_get( s->metadata, "filename", NULL, 0 ); AVDictionaryEntry *filename = av_dict_get( s->metadata, "filename", NULL, 0 );
if( filename && filename->value ) if( filename && filename->value )
{ {
p_attachment = vlc_input_attachment_New( p_attachment = vlc_input_attachment_New(
...@@ -385,7 +392,7 @@ int OpenDemux( vlc_object_t *p_this ) ...@@ -385,7 +392,7 @@ int OpenDemux( vlc_object_t *p_this )
break; break;
} }
AVMetadataTag *language = av_metadata_get( s->metadata, "language", NULL, 0 ); AVDictionaryEntry *language = av_dict_get( s->metadata, "language", NULL, 0 );
if ( language && language->value ) if ( language && language->value )
fmt.psz_language = strdup( language->value ); fmt.psz_language = strdup( language->value );
...@@ -489,7 +496,7 @@ int OpenDemux( vlc_object_t *p_this ) ...@@ -489,7 +496,7 @@ int OpenDemux( vlc_object_t *p_this )
{ {
seekpoint_t *s = vlc_seekpoint_New(); seekpoint_t *s = vlc_seekpoint_New();
AVMetadataTag *title = av_metadata_get( p_sys->ic->metadata, "title", NULL, 0); AVDictionaryEntry *title = av_dict_get( p_sys->ic->metadata, "title", NULL, 0);
if( title && title->value ) if( title && title->value )
{ {
s->psz_name = strdup( title->value ); s->psz_name = strdup( title->value );
...@@ -823,11 +830,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -823,11 +830,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{ {
vlc_meta_t *p_meta = (vlc_meta_t*)va_arg( args, vlc_meta_t* ); vlc_meta_t *p_meta = (vlc_meta_t*)va_arg( args, vlc_meta_t* );
AVMetadataTag *title = av_metadata_get( p_sys->ic->metadata, "language", NULL, 0 ); AVDictionaryEntry *title = av_dict_get( p_sys->ic->metadata, "language", NULL, 0 );
AVMetadataTag *artist = av_metadata_get( p_sys->ic->metadata, "artist", NULL, 0 ); AVDictionaryEntry *artist = av_dict_get( p_sys->ic->metadata, "artist", NULL, 0 );
AVMetadataTag *copyright = av_metadata_get( p_sys->ic->metadata, "copyright", NULL, 0 ); AVDictionaryEntry *copyright = av_dict_get( p_sys->ic->metadata, "copyright", NULL, 0 );
AVMetadataTag *comment = av_metadata_get( p_sys->ic->metadata, "comment", NULL, 0 ); AVDictionaryEntry *comment = av_dict_get( p_sys->ic->metadata, "comment", NULL, 0 );
AVMetadataTag *genre = av_metadata_get( p_sys->ic->metadata, "genre", NULL, 0 ); AVDictionaryEntry *genre = av_dict_get( p_sys->ic->metadata, "genre", NULL, 0 );
if( title && title->value ) if( title && title->value )
vlc_meta_SetTitle( p_meta, title->value ); vlc_meta_SetTitle( p_meta, title->value );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment