Browse Source

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>
tags/n2.2-rc1
Michael Niedermayer 12 years ago
parent
commit
246eae98cf
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavresample/utils.c

+ 5
- 0
libavresample/utils.c View File

@@ -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) {


Loading…
Cancel
Save