diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c index 8e7d2899f1..a4440a3403 100644 --- a/doc/examples/qsv_transcode.c +++ b/doc/examples/qsv_transcode.c @@ -335,10 +335,8 @@ static int dec_enc(AVPacket *pkt, const AVCodec *enc_codec, char *optstr) fail: av_frame_free(&frame); - if (ret < 0) - return ret; } - return 0; + return ret; } int main(int argc, char **argv)