diff mbox series

[FFmpeg-devel,29/30] avcodec/mpegvideo: Remove always-true branch

Message ID AM7PR03MB66603622A7597A049039D7578F7E9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 7d4f200dfa1df80809eec75b0d96bc97475bd01d
Headers show
Series [FFmpeg-devel,01/14] avcodec/mjpegenc: Use custom close function directly | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

Andreas Rheinhardt Dec. 23, 2021, 9:13 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegvideo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 73b91b459c..7626f97be5 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2166,10 +2166,11 @@  void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64],
                             dest_pcm[i] += linesize[i] / 2;
                         }
                     }
-                } else if(s->dpcm_direction == -1) {
+                } else {
                     int i, w, h;
                     uint16_t *dest_pcm[3] = {(uint16_t*)dest_y, (uint16_t*)dest_cb, (uint16_t*)dest_cr};
                     int linesize[3] = {dct_linesize, uvlinesize, uvlinesize};
+                    av_assert2(s->dpcm_direction == -1);
                     for(i = 0; i < 3; i++) {
                         int idx = 0;
                         int vsub = i ? s->chroma_y_shift : 0;