projects
/
libam7xxx.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e41dc82
)
am7xxx-play: don't override return value when there is a usable one
author
Antonio Ospite <ao2@ao2.it>
Wed, 28 Feb 2018 11:43:33 +0000
(12:43 +0100)
committer
Antonio Ospite <ao2@ao2.it>
Thu, 1 Mar 2018 14:33:27 +0000
(15:33 +0100)
Don't override the avcodec_open2() return value, we can pass along the
negative return value as is to the caller.
examples/am7xxx-play.c
patch
|
blob
|
history
diff --git
a/examples/am7xxx-play.c
b/examples/am7xxx-play.c
index
2d1ef48
..
b4356ea
100644
(file)
--- 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 = avcodec_open2(input_codec_ctx, input_codec, NULL);
if (ret < 0) {
fprintf(stderr, "cannot open input codec\n");
- ret = -EINVAL;
goto cleanup;
}
goto cleanup;
}