Mercurial > libavcodec.hg
changeset 5027:696cda281304 libavcodec
Better error reporting.
author | banan |
---|---|
date | Fri, 18 May 2007 10:06:07 +0000 |
parents | 2c260016dd85 |
children | 3d8a813666e4 |
files | dca.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dca.c Fri May 18 08:58:30 2007 +0000 +++ b/dca.c Fri May 18 10:06:07 2007 +0000 @@ -1097,8 +1097,10 @@ uint16_t *ssrc = (uint16_t *) src, *sdst = (uint16_t *) dst; PutBitContext pb; - if((unsigned)src_size > (unsigned)max_size) + if((unsigned)src_size > (unsigned)max_size) { + av_log(NULL, AV_LOG_ERROR, "Input frame size larger then DCA_MAX_FRAME_SIZE!\n"); return -1; + } mrk = AV_RB32(src); switch (mrk) { @@ -1140,7 +1142,7 @@ s->dca_buffer_size = dca_convert_bitstream(buf, buf_size, s->dca_buffer, DCA_MAX_FRAME_SIZE); if (s->dca_buffer_size == -1) { - av_log(avctx, AV_LOG_ERROR, "Not a DCA frame\n"); + av_log(avctx, AV_LOG_ERROR, "Not a valid DCA frame\n"); return -1; }