]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/oggparseogm.c
avformat/mxfdec: always use a stream which matches the first index table when seeking
[ffmpeg] / libavformat / oggparseogm.c
index e7a501b5a71e2ada0c82e7145146ba1c4f0516d6..ca6b62669d5a5182ed2566cfbe445b8078deef60 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <stdlib.h>
 
-#include "libavutil/avassert.h"
 #include "libavutil/intreadwrite.h"
 
 #include "libavcodec/bytestream.h"
@@ -106,10 +105,10 @@ ogm_header(AVFormatContext *s, int idx)
                 size -= 4;
             }
             if (size > 52) {
-                av_assert0(AV_INPUT_BUFFER_PADDING_SIZE <= 52);
                 size -= 52;
                 if (bytestream2_get_bytes_left(&p) < size)
                     return AVERROR_INVALIDDATA;
+                av_freep(&st->codecpar->extradata);
                 if (ff_alloc_extradata(st->codecpar, size) < 0)
                     return AVERROR(ENOMEM);
                 bytestream2_get_buffer(&p, st->codecpar->extradata, st->codecpar->extradata_size);