X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fapetag.c;h=53e076fb8bcf727d119e3412074df3ebc5937612;hb=972df59f4f4d30e44e5544c4f1aa43ef83a19757;hp=2ee277f8642d8670926da793e6096f43cd375877;hpb=0ffaae60e8492f7e797e72338c7e6f3efcd52330;p=ffmpeg diff --git a/libavformat/apetag.c b/libavformat/apetag.c index 2ee277f8642..53e076fb8bc 100644 --- a/libavformat/apetag.c +++ b/libavformat/apetag.c @@ -89,16 +89,16 @@ static int ape_tag_read_field(AVFormatContext *s) } st->disposition |= AV_DISPOSITION_ATTACHED_PIC; - st->codec->codec_type = AVMEDIA_TYPE_VIDEO; - st->codec->codec_id = id; + st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; + st->codecpar->codec_id = id; st->attached_pic = pkt; st->attached_pic.stream_index = st->index; st->attached_pic.flags |= AV_PKT_FLAG_KEY; } else { - if (ff_get_extradata(st->codec, s->pb, size) < 0) + if (ff_get_extradata(st->codecpar, s->pb, size) < 0) return AVERROR(ENOMEM); - st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT; + st->codecpar->codec_type = AVMEDIA_TYPE_ATTACHMENT; } } else { value = av_malloc(size+1); @@ -193,6 +193,7 @@ int ff_ape_write_tag(AVFormatContext *s) APE_TAG_FLAG_IS_HEADER); ffio_fill(dyn_bc, 0, 8); // reserved + ff_standardize_creation_time(s); while ((e = av_dict_get(s->metadata, "", e, AV_DICT_IGNORE_SUFFIX))) { int val_len;