diff mbox series

[FFmpeg-devel,3/4] avcodec/mpegvideo_enc: Remove always-true check

Message ID DU2PR01MB7950FEF6761562D622C20D298FEA9@DU2PR01MB7950.eurprd01.prod.exchangelabs.com
State Accepted
Commit f703cbabdb9bd0f7599d78c6ff1e8a2f38a502b3
Headers show
Series [FFmpeg-devel,1/4] avcodec/mpegvideo_enc: Ignore ICC profile size when not MJPEG | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt April 11, 2022, 11:50 p.m. UTC
It is a remnant of the old way for user-supplied buffers;
it is always-true since 93016f5d1d280f9cb7856883af287fa66affc04c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegvideo_enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 434bbb3a68..c9d8c48026 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1683,7 +1683,7 @@  int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
 
     /* output? */
     if (s->new_picture->data[0]) {
-        int growing_buffer = context_count == 1 && !pkt->data && !s->data_partitioning;
+        int growing_buffer = context_count == 1 && !s->data_partitioning;
         size_t pkt_size = 10000 + s->mb_width * s->mb_height *
                                   (growing_buffer ? 64 : (MAX_MB_BYTES + 100));
         if (CONFIG_MJPEG_ENCODER && avctx->codec_id == AV_CODEC_ID_MJPEG) {