Commit b3e9f3f5 authored by Michael Niedermayer's avatar Michael Niedermayer

doc/examples/hw_decode: Remove logically dead code in decode_write()

Fixes CID1415951
Reviewed-by: 's avatarJun Zhao <mypopydev@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 49a0b3f6
......@@ -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[])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment