diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-05-22 12:46:29 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-06-08 07:43:45 +0200 |
commit | d2d67e424fa10d883e13709095c80bd3b502ce03 (patch) | |
tree | 3ff3180c011e728fbda17dd40e200c0f4946eb07 /ffmpeg.c | |
parent | d9f80ea2a7325f9c84307568843512811a99baff (diff) | |
download | ffmpeg-streaming-d2d67e424fa10d883e13709095c80bd3b502ce03.zip ffmpeg-streaming-d2d67e424fa10d883e13709095c80bd3b502ce03.tar.gz |
Remove all uses of now deprecated metadata functions.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 29 |
1 files changed, 15 insertions, 14 deletions
@@ -39,6 +39,7 @@ #include "libavutil/colorspace.h" #include "libavutil/fifo.h" #include "libavutil/intreadwrite.h" +#include "libavutil/dict.h" #include "libavutil/pixdesc.h" #include "libavutil/avstring.h" #include "libavutil/libm.h" @@ -189,7 +190,7 @@ static int64_t start_time = 0; static int64_t recording_timestamp = 0; static int64_t input_ts_offset = 0; static int file_overwrite = 0; -static AVMetadata *metadata; +static AVDictionary *metadata; static int do_benchmark = 0; static int do_hex_dump = 0; static int do_pkt_dump = 0; @@ -1894,7 +1895,7 @@ static int copy_chapters(int infile, int outfile) out_ch->end = FFMIN(rt, in_ch->end - ts_off); if (metadata_chapters_autocopy) - av_metadata_copy(&out_ch->metadata, in_ch->metadata, 0); + av_dict_copy(&out_ch->metadata, in_ch->metadata, 0); os->nb_chapters++; os->chapters = av_realloc(os->chapters, sizeof(AVChapter)*os->nb_chapters); @@ -2083,8 +2084,8 @@ static int transcode(AVFormatContext **output_files, icodec = ist->st->codec; if (metadata_streams_autocopy) - av_metadata_copy(&ost->st->metadata, ist->st->metadata, - AV_METADATA_DONT_OVERWRITE); + av_dict_copy(&ost->st->metadata, ist->st->metadata, + AV_DICT_DONT_OVERWRITE); ost->st->disposition = ist->st->disposition; codec->bits_per_raw_sample= icodec->bits_per_raw_sample; @@ -2352,7 +2353,7 @@ static int transcode(AVFormatContext **output_files, /* set meta data information from input file if required */ for (i=0;i<nb_meta_data_maps;i++) { AVFormatContext *files[2]; - AVMetadata **meta[2]; + AVDictionary **meta[2]; int j; #define METADATA_CHECK_INDEX(index, nb_elems, desc)\ @@ -2395,15 +2396,15 @@ static int transcode(AVFormatContext **output_files, } } - av_metadata_copy(meta[0], *meta[1], AV_METADATA_DONT_OVERWRITE); + av_dict_copy(meta[0], *meta[1], AV_DICT_DONT_OVERWRITE); } /* copy global metadata by default */ if (metadata_global_autocopy) { for (i = 0; i < nb_output_files; i++) - av_metadata_copy(&output_files[i]->metadata, input_files[0].ctx->metadata, - AV_METADATA_DONT_OVERWRITE); + av_dict_copy(&output_files[i]->metadata, input_files[0].ctx->metadata, + AV_DICT_DONT_OVERWRITE); } /* copy chapters according to chapter maps */ @@ -2818,7 +2819,7 @@ static int opt_metadata(const char *opt, const char *arg) } *mid++= 0; - av_metadata_set2(&metadata, arg, mid, 0); + av_dict_set(&metadata, arg, mid, 0); return 0; } @@ -3523,7 +3524,7 @@ static void new_video_stream(AVFormatContext *oc, int file_idx) parse_forced_key_frames(forced_key_frames, ost, video_enc); } if (video_language) { - av_metadata_set2(&st->metadata, "language", video_language, 0); + av_dict_set(&st->metadata, "language", video_language, 0); av_freep(&video_language); } @@ -3603,7 +3604,7 @@ static void new_audio_stream(AVFormatContext *oc, int file_idx) } audio_enc->time_base= (AVRational){1, audio_sample_rate}; if (audio_language) { - av_metadata_set2(&st->metadata, "language", audio_language, 0); + av_dict_set(&st->metadata, "language", audio_language, 0); av_freep(&audio_language); } @@ -3699,7 +3700,7 @@ static void new_subtitle_stream(AVFormatContext *oc, int file_idx) } if (subtitle_language) { - av_metadata_set2(&st->metadata, "language", subtitle_language, 0); + av_dict_set(&st->metadata, "language", subtitle_language, 0); av_freep(&subtitle_language); } @@ -3830,8 +3831,8 @@ static void opt_output_file(const char *filename) oc->timestamp = recording_timestamp; - av_metadata_copy(&oc->metadata, metadata, 0); - av_metadata_free(&metadata); + av_dict_copy(&oc->metadata, metadata, 0); + av_dict_free(&metadata); } output_files[nb_output_files++] = oc; |