]> git.sesse.net Git - ffmpeg/commit
avcodec/gdv: Remove dead check
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 5 Nov 2020 20:35:56 +0000 (21:35 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 10 Nov 2020 01:14:29 +0000 (02:14 +0100)
commit7e8306dd2da54fa499ea79a74f0ba81507e6c9d4
treeac40b4c4be31beb6d8b4b2e6047196621da4cba9
parentd2dcb113f8e4e6e372007a354a600e6c2579ea8b
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>
libavcodec/gdv.c