aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/gdv.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-05 21:35:56 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-10 02:14:29 +0100
commit7e8306dd2da54fa499ea79a74f0ba81507e6c9d4 (patch)
treeac40b4c4be31beb6d8b4b2e6047196621da4cba9 /libavcodec/gdv.c
parentd2dcb113f8e4e6e372007a354a600e6c2579ea8b (diff)
downloadffmpeg-7e8306dd2da54fa499ea79a74f0ba81507e6c9d4.tar.gz
avcodec/gdv: Remove dead check
At the end of its decode function, the decoder sets *got_frame to 1 and then checks whether ret is < 0; if so, it is returned, otherwise avpkt->size is. But it is impossible for ret to be < 0 here and if it were, it would be nonsense to set *got_frame to 1 before this. Therefore just return avpkt->size unconditionally. Fixes Coverity issue #1439730. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/gdv.c')
-rw-r--r--libavcodec/gdv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c
index f00f3ac145..2be1e2ea7f 100644
--- a/libavcodec/gdv.c
+++ b/libavcodec/gdv.c
@@ -551,7 +551,7 @@ static int gdv_decode_frame(AVCodecContext *avctx, void *data,
*got_frame = 1;
- return ret < 0 ? ret : avpkt->size;
+ return avpkt->size;
}
static av_cold int gdv_decode_close(AVCodecContext *avctx)