swr: check that the context for swr_convert() has been initialized

Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/56/merge
Michael Niedermayer 11 years ago
parent a66be60888
commit 6c6e4dd139
  1. 5
      libswresample/swresample.c

@ -742,6 +742,11 @@ int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_coun
AudioData * in= &s->in;
AudioData *out= &s->out;
if (!swr_is_initialized(s)) {
av_log(s, AV_LOG_ERROR, "Context has not been initialized\n");
return AVERROR(EINVAL);
}
while(s->drop_output > 0){
int ret;
uint8_t *tmp_arg[SWR_CH_MAX];

Loading…
Cancel
Save