Commit fec9ccb7 authored by Michael Niedermayer's avatar Michael Niedermayer

check for CODEC_CAP_DELAY in audio decoders too

Originally committed as revision 4439 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 46044471
...@@ -642,9 +642,12 @@ int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, ...@@ -642,9 +642,12 @@ int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
int ret; int ret;
*frame_size_ptr= 0; *frame_size_ptr= 0;
ret = avctx->codec->decode(avctx, samples, frame_size_ptr, if((avctx->codec->capabilities & CODEC_CAP_DELAY) || buf_size){
buf, buf_size); ret = avctx->codec->decode(avctx, samples, frame_size_ptr,
avctx->frame_number++; buf, buf_size);
avctx->frame_number++;
}else
ret= 0;
return ret; return ret;
} }
......
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