]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/qpeg.c
avformat: remove avio_flush() calls from the end of write_packet functions
[ffmpeg] / libavcodec / qpeg.c
index 654fd998d6abb11efaa7546ca3f7518dfe6b5dd0..d4195c5f0b7f145e7bbbf28dc894c8e0bed4b9ab 100644 (file)
@@ -99,6 +99,8 @@ static void qpeg_decode_intra(QpegContext *qctx, uint8_t *dst,
                 }
             }
         } else {
+            if (bytestream2_get_bytes_left(&qctx->buffer) < copy)
+                copy = bytestream2_get_bytes_left(&qctx->buffer);
             for(i = 0; i < copy; i++) {
                 dst[filled++] = bytestream2_get_byte(&qctx->buffer);
                 if (filled >= width) {