diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-09-12 21:00:34 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-09-13 20:09:53 +0200 |
commit | 8ad54a44eb14553911ca737ee5cb806f616ff7fe (patch) | |
tree | 313eb19303b24329569edda576a385fec6853832 /libavfilter/audio.c | |
parent | c262ddb8c5e2060b76a84e70a7e46fa134c1799a (diff) | |
download | ffmpeg-8ad54a44eb14553911ca737ee5cb806f616ff7fe.tar.gz |
lavfi: check that buffer and link properties match.
Diffstat (limited to 'libavfilter/audio.c')
-rw-r--r-- | libavfilter/audio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/audio.c b/libavfilter/audio.c index ae78ed8a5e..06702a6043 100644 --- a/libavfilter/audio.c +++ b/libavfilter/audio.c @@ -225,6 +225,10 @@ int ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref) int nb_channels = av_get_channel_layout_nb_channels(link->channel_layout); int ret = 0; + av_assert1(samplesref->format == link->format); + av_assert1(samplesref->audio->channel_layout == link->channel_layout); + av_assert1(samplesref->audio->sample_rate == link->sample_rate); + if (!link->min_samples || (!pbuf && insamples >= link->min_samples && insamples <= link->max_samples)) { |