summaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-03-25 20:21:38 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-03-27 23:01:44 +0200
commitb3e9f3f5f52d2c769e0cb6ab1676e16c858e19b3 (patch)
tree5e4b97ca61d366748e0a12ffe637256c2efd29ee /doc/examples
parent49a0b3f6bc963583a490c3397f2055365b4d821e (diff)
downloadffmpeg-streaming-b3e9f3f5f52d2c769e0cb6ab1676e16c858e19b3.zip
ffmpeg-streaming-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>
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/hw_decode.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/doc/examples/hw_decode.c b/doc/examples/hw_decode.c
index 74a0ca3..77ae8df 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[])
OpenPOWER on IntegriCloud