diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-03-25 20:21:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-03-27 23:01:44 +0200 |
commit | b3e9f3f5f52d2c769e0cb6ab1676e16c858e19b3 (patch) | |
tree | 5e4b97ca61d366748e0a12ffe637256c2efd29ee | |
parent | 49a0b3f6bc963583a490c3397f2055365b4d821e (diff) | |
download | ffmpeg-b3e9f3f5f52d2c769e0cb6ab1676e16c858e19b3.tar.gz |
doc/examples/hw_decode: Remove logically dead code in decode_write()
Fixes CID1415951
Reviewed-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | doc/examples/hw_decode.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/doc/examples/hw_decode.c b/doc/examples/hw_decode.c index 74a0ca32db..77ae8df35b 100644 --- a/doc/examples/hw_decode.c +++ b/doc/examples/hw_decode.c @@ -86,7 +86,7 @@ static int decode_write(AVCodecContext *avctx, AVPacket *packet) return ret; } - while (ret >= 0) { + while (1) { if (!(frame = av_frame_alloc()) || !(sw_frame = av_frame_alloc())) { fprintf(stderr, "Can not alloc frame\n"); ret = AVERROR(ENOMEM); @@ -142,8 +142,6 @@ static int decode_write(AVCodecContext *avctx, AVPacket *packet) if (ret < 0) return ret; } - - return 0; } int main(int argc, char *argv[]) |