diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-26 14:47:08 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-26 14:47:08 +0100 |
commit | 325ee4ed7ad2aefb45c0f917285d04b3c3503f40 (patch) | |
tree | b3d9e5677bb81d1983acf4b62af63157cc3b87b8 /libavcodec/eatgq.c | |
parent | 3a9f48f0337ddb51c167193548a635f68258b57d (diff) | |
parent | f337c29017b10c98ccb4dce20efced4c74b665f6 (diff) | |
download | ffmpeg-325ee4ed7ad2aefb45c0f917285d04b3c3503f40.tar.gz |
Merge commit 'f337c29017b10c98ccb4dce20efced4c74b665f6'
* commit 'f337c29017b10c98ccb4dce20efced4c74b665f6':
eatgq: return meaningful error codes.
eatgv: cosmetics, reformat
Conflicts:
libavcodec/eatgq.c
libavcodec/eatgv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/eatgq.c')
-rw-r--r-- | libavcodec/eatgq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index fba6e831cf..cba9a16923 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -194,12 +194,12 @@ static int tgq_decode_frame(AVCodecContext *avctx, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; TgqContext *s = avctx->priv_data; - int x,y; + int x, y, ret; int big_endian; if (buf_size < 16) { av_log(avctx, AV_LOG_WARNING, "truncated header\n"); - return -1; + return AVERROR_INVALIDDATA; } big_endian = AV_RL32(&buf[4]) > 0x000FFFFF; bytestream2_init(&s->gb, buf + 8, buf_size - 8); @@ -223,9 +223,9 @@ static int tgq_decode_frame(AVCodecContext *avctx, s->frame.key_frame = 1; s->frame.pict_type = AV_PICTURE_TYPE_I; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID; - if (ff_get_buffer(avctx, &s->frame)) { + if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); - return -1; + return ret; } } |