summaryrefslogtreecommitdiff
path: root/libavdevice/lavfi.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-05 16:15:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-07 15:41:17 +0200
commit75bd83d448fec8108cdbb6a4f78cd0f7b1fc411e (patch)
tree45551fd3089511a956aafda463f20c23fd1b28a6 /libavdevice/lavfi.c
parent8fa695a9e37933f4f943028c0dbcc35b1fb68d28 (diff)
downloadffmpeg-75bd83d448fec8108cdbb6a4f78cd0f7b1fc411e.tar.gz
avdevice/lavfi: Simplify non-AV stream check
Fixes a clang warning Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/lavfi.c')
-rw-r--r--libavdevice/lavfi.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index f1c88ac610..4cfe804c32 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -184,14 +184,6 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
FAIL(AVERROR(EINVAL));
}
- /* is an audio or video output? */
- type = inout->filter_ctx->output_pads[inout->pad_idx].type;
- if (type != AVMEDIA_TYPE_VIDEO && type != AVMEDIA_TYPE_AUDIO) {
- av_log(avctx, AV_LOG_ERROR,
- "Output '%s' is not a video or audio output, not yet supported\n", inout->name);
- FAIL(AVERROR(EINVAL));
- }
-
if (lavfi->stream_sink_map[stream_idx] != -1) {
av_log(avctx, AV_LOG_ERROR,
"An output with stream index %d was already specified\n",
@@ -252,6 +244,10 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
AV_OPT_SEARCH_CHILDREN);
if (ret < 0)
goto end;
+ } else {
+ av_log(avctx, AV_LOG_ERROR,
+ "Output '%s' is not a video or audio output, not yet supported\n", inout->name);
+ FAIL(AVERROR(EINVAL));
}
lavfi->sinks[i] = sink;