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:
parent
a66be60888
commit
6c6e4dd139
@ -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 * in= &s->in;
|
||||||
AudioData *out= &s->out;
|
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){
|
while(s->drop_output > 0){
|
||||||
int ret;
|
int ret;
|
||||||
uint8_t *tmp_arg[SWR_CH_MAX];
|
uint8_t *tmp_arg[SWR_CH_MAX];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user