Commit 6c6e4dd1 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Reviewed-by: ubitux
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a66be608
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment