From: Antonio Ospite Date: Wed, 28 Feb 2018 11:43:33 +0000 (+0100) Subject: am7xxx-play: don't override return value when there is a usable one X-Git-Tag: v0.1.7~13 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/7193dbf2d47df0d9e317d41543292004940cc047?hp=e41dc82604ddea054c5e454d40769cab3b07c6ff am7xxx-play: don't override return value when there is a usable one Don't override the avcodec_open2() return value, we can pass along the negative return value as is to the caller. --- diff --git a/examples/am7xxx-play.c b/examples/am7xxx-play.c index 2d1ef48..b4356ea 100644 --- a/examples/am7xxx-play.c +++ b/examples/am7xxx-play.c @@ -126,7 +126,6 @@ static int video_input_init(struct video_input_ctx *input_ctx, ret = avcodec_open2(input_codec_ctx, input_codec, NULL); if (ret < 0) { fprintf(stderr, "cannot open input codec\n"); - ret = -EINVAL; goto cleanup; }