[vlc-commits] avformat: AVMetadataTag and av_metadata_get don't exist anymore
Rafaël Carré
git at videolan.org
Sun Jan 29 06:32:04 CET 2012
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Jan 29 00:00:13 2012 -0500| [55c0636c559e3db6cb354306438c83e278430f48] | committer: Rafaël Carré
avformat: AVMetadataTag and av_metadata_get don't exist anymore
They were copied verbatim to AVDictionary equivalents some time ago
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55c0636c559e3db6cb354306438c83e278430f48
---
modules/demux/avformat/demux.c | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 6c66012..b8d8331 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -46,6 +46,13 @@
#include "../xiph.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
/* Version checking */
@@ -354,7 +361,7 @@ int OpenDemux( vlc_object_t *p_this )
psz_type = "attachment";
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 )
{
p_attachment = vlc_input_attachment_New(
@@ -377,7 +384,7 @@ int OpenDemux( vlc_object_t *p_this )
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 )
fmt.psz_language = strdup( language->value );
@@ -481,7 +488,7 @@ int OpenDemux( vlc_object_t *p_this )
{
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 )
{
s->psz_name = strdup( title->value );
@@ -795,11 +802,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* );
- AVMetadataTag *title = av_metadata_get( p_sys->ic->metadata, "language", NULL, 0 );
- AVMetadataTag *artist = av_metadata_get( p_sys->ic->metadata, "artist", NULL, 0 );
- AVMetadataTag *copyright = av_metadata_get( p_sys->ic->metadata, "copyright", NULL, 0 );
- AVMetadataTag *comment = av_metadata_get( p_sys->ic->metadata, "comment", NULL, 0 );
- AVMetadataTag *genre = av_metadata_get( p_sys->ic->metadata, "genre", NULL, 0 );
+ AVDictionaryEntry *title = av_dict_get( p_sys->ic->metadata, "language", NULL, 0 );
+ AVDictionaryEntry *artist = av_dict_get( p_sys->ic->metadata, "artist", NULL, 0 );
+ AVDictionaryEntry *copyright = av_dict_get( p_sys->ic->metadata, "copyright", NULL, 0 );
+ AVDictionaryEntry *comment = av_dict_get( p_sys->ic->metadata, "comment", NULL, 0 );
+ AVDictionaryEntry *genre = av_dict_get( p_sys->ic->metadata, "genre", NULL, 0 );
if( title && title->value )
vlc_meta_SetTitle( p_meta, title->value );
More information about the vlc-commits
mailing list