Commit 2f0ea1ee authored by michael's avatar michael

check for CODEC_CAP_DELAY in audio decoders too


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4439 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0d1c10fe
......@@ -642,9 +642,12 @@ int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples,
int ret;
*frame_size_ptr= 0;
ret = avctx->codec->decode(avctx, samples, frame_size_ptr,
buf, buf_size);
avctx->frame_number++;
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || buf_size){
ret = avctx->codec->decode(avctx, samples, frame_size_ptr,
buf, buf_size);
avctx->frame_number++;
}else
ret= 0;
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