diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2013-03-16 17:45:22 +0100 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2013-03-17 12:31:24 +0100 |
commit | f29c28a884c01ea63559fd6bc2250a6b5f78cbb0 (patch) | |
tree | 24add4c8a75ddc3f22b4bf493f5df9ba072f6601 /libavfilter | |
parent | 3cd342636fa245185fce7f4d6709a7a954f05ef8 (diff) | |
download | ffmpeg-f29c28a884c01ea63559fd6bc2250a6b5f78cbb0.tar.gz |
lavfi/buffersrc: check channel count changes.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/buffersrc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index af66130255..3887d05e73 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -68,9 +68,9 @@ typedef struct { av_log(s, AV_LOG_INFO, "Changing frame properties on the fly is not supported by all filters.\n");\ } -#define CHECK_AUDIO_PARAM_CHANGE(s, c, srate, ch_layout, format)\ +#define CHECK_AUDIO_PARAM_CHANGE(s, c, srate, ch_layout, ch_count, format)\ if (c->sample_fmt != format || c->sample_rate != srate ||\ - c->channel_layout != ch_layout) {\ + c->channel_layout != ch_layout || c->channels != ch_count) {\ av_log(s, AV_LOG_ERROR, "Changing frame properties on the fly is not supported.\n");\ return AVERROR(EINVAL);\ } @@ -138,7 +138,7 @@ static int attribute_align_arg av_buffersrc_add_frame_internal(AVFilterContext * if (!frame->channel_layout) frame->channel_layout = s->channel_layout; CHECK_AUDIO_PARAM_CHANGE(ctx, s, frame->sample_rate, frame->channel_layout, - frame->format); + av_frame_get_channels(frame), frame->format); break; default: return AVERROR(EINVAL); |