# HG changeset patch # User michael # Date 1121355039 0 # Node ID f191093dc8fe14c57099635cf1129f814d8f8794 # Parent 5446a52ad4df936f0b62210fc514a0d0a6c12167 check for CODEC_CAP_DELAY in audio decoders too diff -r 5446a52ad4df -r f191093dc8fe utils.c --- a/utils.c Thu Jul 14 14:34:39 2005 +0000 +++ b/utils.c Thu Jul 14 15:30:39 2005 +0000 @@ -642,9 +642,12 @@ 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; }