]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/apetag.c
Merge commit 'c23152a90371bfe971b063781ef4e7d9d5ef9d70'
[ffmpeg] / libavformat / apetag.c
index 2ee277f8642d8670926da793e6096f43cd375877..53e076fb8bcf727d119e3412074df3ebc5937612 100644 (file)
@@ -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;