You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avdevice/lavfi: add error checking for av_opt_set_int_list()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -230,8 +230,8 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
|
|||||||
ret = avfilter_graph_create_filter(&sink, buffersink,
|
ret = avfilter_graph_create_filter(&sink, buffersink,
|
||||||
inout->name, NULL,
|
inout->name, NULL,
|
||||||
NULL, lavfi->graph);
|
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)
|
if (ret < 0)
|
||||||
goto end;
|
goto end;
|
||||||
} else if (type == AVMEDIA_TYPE_AUDIO) {
|
} 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,
|
ret = avfilter_graph_create_filter(&sink, abuffersink,
|
||||||
inout->name, NULL,
|
inout->name, NULL,
|
||||||
NULL, lavfi->graph);
|
NULL, lavfi->graph);
|
||||||
|
if (ret >= 0)
|
||||||
av_opt_set_int_list(sink, "sample_fmts", sample_fmts, AV_SAMPLE_FMT_NONE, AV_OPT_SEARCH_CHILDREN);
|
ret = av_opt_set_int_list(sink, "sample_fmts", sample_fmts, AV_SAMPLE_FMT_NONE, AV_OPT_SEARCH_CHILDREN);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user