diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-22 21:11:59 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-22 21:12:02 +0100 |
commit | 246eae98cfe4eee9c3a812962b3af51749c59fa8 (patch) | |
tree | cfc5eee22e1ae8bc5e9d55445a6af13fb7b7e4f3 | |
parent | 5367c0be623885eb0fcd0542564150d79d881a1c (diff) | |
parent | 1db03a68641193832fc759c88049adbe8a449310 (diff) | |
download | ffmpeg-246eae98cfe4eee9c3a812962b3af51749c59fa8.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
lavr: return an error if a avresample_open() is called on an open context
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavresample/utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavresample/utils.c b/libavresample/utils.c index 37c3f90afa..551a7e075e 100644 --- a/libavresample/utils.c +++ b/libavresample/utils.c @@ -36,6 +36,11 @@ int avresample_open(AVAudioResampleContext *avr) { int ret; + if (avresample_is_open(avr)) { + av_log(avr, AV_LOG_ERROR, "The resampling context is already open.\n"); + return AVERROR(EINVAL); + } + /* set channel mixing parameters */ avr->in_channels = av_get_channel_layout_nb_channels(avr->in_channel_layout); if (avr->in_channels <= 0 || avr->in_channels > AVRESAMPLE_MAX_CHANNELS) { |