]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avs.c
Avoid intermediate bitcount for number of bytes in PutBitContext
[ffmpeg] / libavformat / avs.c
index 3f8780d42d8150b43c2f886ddba539d9171e76c0..097c17190820104a400eacef33f140b8842308d7 100644 (file)
@@ -114,7 +114,6 @@ avs_read_video_packet(AVFormatContext * s, AVPacket * pkt,
     pkt->data[palette_size + 3] = (size >> 8) & 0xFF;
     ret = avio_read(s->pb, pkt->data + palette_size + 4, size - 4) + 4;
     if (ret < size) {
-        av_packet_unref(pkt);
         return AVERROR(EIO);
     }
 
@@ -129,7 +128,8 @@ avs_read_video_packet(AVFormatContext * s, AVPacket * pkt,
 static int avs_read_audio_packet(AVFormatContext * s, AVPacket * pkt)
 {
     AvsFormat *avs = s->priv_data;
-    int ret, size;
+    int ret;
+    int64_t size;
 
     size = avio_tell(s->pb);
     ret = ff_voc_get_packet(s, pkt, avs->st_audio, avs->remaining_audio_size);