diff mbox series

[FFmpeg-devel,24/36] fftools/ffmpeg: replace an unreachable return with av_assert0(0)

Message ID 20230517102029.541-24-anton@khirnov.net
State Accepted
Commit 4fbc699ac3c9ab69b4c5474145593c809e0286f8
Headers show
Series [FFmpeg-devel,01/36] fftools/ffmpeg: shorten a variable name | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 fail Make fate failed

Commit Message

Anton Khirnov May 17, 2023, 10:20 a.m. UTC
This cannot be reached, because initialization will fail if decoding is
requested for a stream but no decoder can be found.
---
 fftools/ffmpeg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 62620bacce..1fcabd123a 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1390,8 +1390,7 @@  static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
                 ret = AVERROR_EOF;
             av_packet_unref(avpkt);
             break;
-        default:
-            return -1;
+        default: av_assert0(0);
         }
 
         if (ret == AVERROR_EOF) {