]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/apetag.c
configure: Drop weak dependencies on external libraries for webm muxer
[ffmpeg] / libavformat / apetag.c
index 5591555377e2b11a4e94b54733bb443cfb4dac68..05430dd9bcc3f78c2add33dd5fdc45efcc12f336 100644 (file)
@@ -87,22 +87,22 @@ 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 {
-            st->codec->extradata = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE);
-            if (!st->codec->extradata)
+            st->codecpar->extradata = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE);
+            if (!st->codecpar->extradata)
                 return AVERROR(ENOMEM);
-            if (avio_read(pb, st->codec->extradata, size) != size) {
-                av_freep(&st->codec->extradata);
+            if (avio_read(pb, st->codecpar->extradata, size) != size) {
+                av_freep(&st->codecpar->extradata);
                 return AVERROR(EIO);
             }
-            st->codec->extradata_size = size;
-            st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
+            st->codecpar->extradata_size = size;
+            st->codecpar->codec_type = AVMEDIA_TYPE_ATTACHMENT;
         }
     } else {
         value = av_malloc(size+1);
@@ -182,7 +182,7 @@ int ff_ape_write_tag(AVFormatContext *s)
     int64_t start, end;
     int size, count = 0;
 
-    if (!s->pb->seekable)
+    if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL))
         return 0;
 
     start = avio_tell(s->pb);