]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/westwood_vqa.c
rtspenc: Check the return value from ffio_open_dyn_packet_buf
[ffmpeg] / libavformat / westwood_vqa.c
index 7c9cb0db81a2fc2019080a91c4405c520b67afde..77da375e70c835f3a56e89d3b5d31ca11bae7330 100644 (file)
@@ -106,7 +106,6 @@ static int wsvqa_read_header(AVFormatContext *s)
     header = (unsigned char *)st->codec->extradata;
     if (avio_read(pb, st->codec->extradata, VQA_HEADER_SIZE) !=
         VQA_HEADER_SIZE) {
-        av_free(st->codec->extradata);
         return AVERROR(EIO);
     }
     st->codec->width = AV_RL16(&header[6]);
@@ -132,7 +131,6 @@ static int wsvqa_read_header(AVFormatContext *s)
      * FINF has been skipped and the file will be ready to be demuxed */
     do {
         if (avio_read(pb, scratch, VQA_PREAMBLE_SIZE) != VQA_PREAMBLE_SIZE) {
-            av_free(st->codec->extradata);
             return AVERROR(EIO);
         }
         chunk_tag = AV_RB32(&scratch[0]);