X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Foggparsevorbis.c;h=ba9b34845654854e771ac9212fc4f0ecdf856855;hb=a40f6a5c698e314ab8c2770c1230ae0d0bd23a33;hp=830f0bca37e28edec17a96430a9b8768e75902d3;hpb=f81946729e21005fe8d6a63a938e48c09b9b14b4;p=ffmpeg diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 830f0bca37e..ba9b3484565 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -25,6 +25,7 @@ #include #include "libavutil/avstring.h" #include "libavutil/bswap.h" +#include "libavutil/dict.h" #include "libavcodec/get_bits.h" #include "libavcodec/bytestream.h" #include "avformat.h" @@ -44,7 +45,7 @@ static int ogm_chapter(AVFormatContext *as, uint8_t *key, uint8_t *val) if (sscanf(val, "%02d:%02d:%02d.%03d", &h, &m, &s, &ms) < 4) return 0; - ff_new_chapter(as, cnum, (AVRational){1,1000}, + avpriv_new_chapter(as, cnum, (AVRational){1,1000}, ms + 1000*(s + 60*(m + 60*h)), AV_NOPTS_VALUE, NULL); av_free(val); @@ -57,8 +58,8 @@ static int ogm_chapter(AVFormatContext *as, uint8_t *key, uint8_t *val) if (!chapter) return 0; - av_metadata_set2(&chapter->metadata, "title", val, - AV_METADATA_DONT_STRDUP_VAL); + av_dict_set(&chapter->metadata, "title", val, + AV_DICT_DONT_STRDUP_VAL); } else return 0; @@ -67,7 +68,7 @@ static int ogm_chapter(AVFormatContext *as, uint8_t *key, uint8_t *val) } int -ff_vorbis_comment(AVFormatContext * as, AVMetadata **m, const uint8_t *buf, int size) +ff_vorbis_comment(AVFormatContext * as, AVDictionary **m, const uint8_t *buf, int size) { const uint8_t *p = buf; const uint8_t *end = buf + size; @@ -127,9 +128,9 @@ ff_vorbis_comment(AVFormatContext * as, AVMetadata **m, const uint8_t *buf, int ct[vl] = 0; if (!ogm_chapter(as, tt, ct)) - av_metadata_set2(m, tt, ct, - AV_METADATA_DONT_STRDUP_KEY | - AV_METADATA_DONT_STRDUP_VAL); + av_dict_set(m, tt, ct, + AV_DICT_DONT_STRDUP_KEY | + AV_DICT_DONT_STRDUP_VAL); } } @@ -253,7 +254,7 @@ vorbis_header (AVFormatContext * s, int idx) if (srate > 0) { st->codec->sample_rate = srate; - av_set_pts_info(st, 64, 1, srate); + avpriv_set_pts_info(st, 64, 1, srate); } } else if (os->buf[os->pstart] == 3) { if (os->psize > 8 &&