]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/dvenc: Remove dead error message
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 25 Mar 2021 04:36:22 +0000 (05:36 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Tue, 30 Mar 2021 10:36:31 +0000 (12:36 +0200)
The PutBits API checks the available space before every write,
so this check for overread is dead.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/dvenc.c

index 233e2b68c7fed201419c3cc6f560faf8640472fc..134315a834acad78bbd26aab7a97f64934389f0d 100644 (file)
@@ -980,11 +980,6 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg)
         int size = pbs[j].size_in_bits >> 3;
         flush_put_bits(&pbs[j]);
         pos = put_bits_count(&pbs[j]) >> 3;
-        if (pos > size) {
-            av_log(avctx, AV_LOG_ERROR,
-                   "bitstream written beyond buffer size\n");
-            return -1;
-        }
         memset(pbs[j].buf + pos, 0xff, size - pos);
     }