1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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

Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-02-22 22:29:51 +01:00
parent a66be60888
commit 6c6e4dd139

View File

@ -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];