aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Larsson <banan@ludd.ltu.se>2007-05-18 10:06:07 +0000
committerBenjamin Larsson <banan@ludd.ltu.se>2007-05-18 10:06:07 +0000
commit56fd7cc584ae1862eed64972fa89334c2d221079 (patch)
tree1d00b7d15fd54dc9d7a760377f0ca2adad9d225e
parentbf1a5a46d68d0dba66a5f43e9000ce937709ffd6 (diff)
downloadffmpeg-56fd7cc584ae1862eed64972fa89334c2d221079.tar.gz
Better error reporting.
Originally committed as revision 9056 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/dca.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 3a71aca3a5..4f0f354950 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -1097,8 +1097,10 @@ static int dca_convert_bitstream(uint8_t * src, int src_size, uint8_t * dst,
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 @@ static int dca_decode_frame(AVCodecContext * avctx,
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;
}