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>
This commit is contained in:
Michael Niedermayer 2018-03-25 20:21:38 +02:00
parent 49a0b3f6bc
commit b3e9f3f5f5
1 changed files with 1 additions and 3 deletions

View File

@ -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[])