aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice/lavfi.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-12 20:34:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-12 20:39:07 +0200
commit9b595e86e342e0e39c5ddf9020286cae258b9965 (patch)
tree7538b0fd6c27f1928c2451e08b6a2c0b79beb541 /libavdevice/lavfi.c
parente87c1cdbb5486497b7df2bf7f62f2c8cbe2bcac7 (diff)
downloadffmpeg-9b595e86e342e0e39c5ddf9020286cae258b9965.tar.gz
avdevice/lavfi: add error checking for av_opt_set_int_list()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/lavfi.c')
-rw-r--r--libavdevice/lavfi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 15ac055dcd..c1c9cf55b8 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -230,8 +230,8 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
ret = avfilter_graph_create_filter(&sink, buffersink,
inout->name, NULL,
NULL, lavfi->graph);
- av_opt_set_int_list(sink, "pix_fmts", pix_fmts, AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN);
-
+ if (ret >= 0)
+ ret = av_opt_set_int_list(sink, "pix_fmts", pix_fmts, AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN);
if (ret < 0)
goto end;
} else if (type == AVMEDIA_TYPE_AUDIO) {
@@ -244,8 +244,8 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
ret = avfilter_graph_create_filter(&sink, abuffersink,
inout->name, NULL,
NULL, lavfi->graph);
-
- av_opt_set_int_list(sink, "sample_fmts", sample_fmts, AV_SAMPLE_FMT_NONE, AV_OPT_SEARCH_CHILDREN);
+ if (ret >= 0)
+ ret = av_opt_set_int_list(sink, "sample_fmts", sample_fmts, AV_SAMPLE_FMT_NONE, AV_OPT_SEARCH_CHILDREN);
if (ret < 0)
goto end;
}