Mercurial > libavcodec.hg
comparison utils.c @ 2791:f191093dc8fe libavcodec
check for CODEC_CAP_DELAY in audio decoders too
| author | michael |
|---|---|
| date | Thu, 14 Jul 2005 15:30:39 +0000 |
| parents | 2b37bcabe608 |
| children | bf5c4e9dc75a |
comparison
equal
deleted
inserted
replaced
| 2790:5446a52ad4df | 2791:f191093dc8fe |
|---|---|
| 640 uint8_t *buf, int buf_size) | 640 uint8_t *buf, int buf_size) |
| 641 { | 641 { |
| 642 int ret; | 642 int ret; |
| 643 | 643 |
| 644 *frame_size_ptr= 0; | 644 *frame_size_ptr= 0; |
| 645 ret = avctx->codec->decode(avctx, samples, frame_size_ptr, | 645 if((avctx->codec->capabilities & CODEC_CAP_DELAY) || buf_size){ |
| 646 buf, buf_size); | 646 ret = avctx->codec->decode(avctx, samples, frame_size_ptr, |
| 647 avctx->frame_number++; | 647 buf, buf_size); |
| 648 avctx->frame_number++; | |
| 649 }else | |
| 650 ret= 0; | |
| 648 return ret; | 651 return ret; |
| 649 } | 652 } |
| 650 | 653 |
| 651 /* decode a subtitle message. return -1 if error, otherwise return the | 654 /* decode a subtitle message. return -1 if error, otherwise return the |
| 652 *number of bytes used. If no subtitle could be decompressed, | 655 *number of bytes used. If no subtitle could be decompressed, |
