aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ptx.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-07 01:24:32 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-07 01:24:32 +0100
commit501db2f32babff8e2851ffd7aeb6bcb1ecb47d19 (patch)
treea911a0ca4813975ecc9baae4182b3fea8ef45944 /libavcodec/ptx.c
parent4b20d307b32b3562b7cd595cd00dae30203a51fc (diff)
parent9dbbda235d93d628777b986e502213f1ed390973 (diff)
downloadandroid_external_ffmpeg-501db2f32babff8e2851ffd7aeb6bcb1ecb47d19.tar.gz
android_external_ffmpeg-501db2f32babff8e2851ffd7aeb6bcb1ecb47d19.tar.bz2
android_external_ffmpeg-501db2f32babff8e2851ffd7aeb6bcb1ecb47d19.zip
Merge commit '9dbbda235d93d628777b986e502213f1ed390973'
* commit '9dbbda235d93d628777b986e502213f1ed390973': vb: return meaningful error codes. ptx: return meaningful error codes. tiff: return meaningful error codes. vqavideo: return meaningful error codes. mss2: return meaningful error codes. v210dec: return meaningful error codes indeo2: cosmetics, reformat Conflicts: libavcodec/indeo2.c libavcodec/tiff.c libavcodec/v210dec.c libavcodec/vb.c libavcodec/vqavideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ptx.c')
-rw-r--r--libavcodec/ptx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c
index 720dad1b94..1a76c55c89 100644
--- a/libavcodec/ptx.c
+++ b/libavcodec/ptx.c
@@ -46,6 +46,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVFrame *picture = data;
AVFrame * const p = &s->picture;
unsigned int offset, w, h, y, stride, bytes_per_pixel;
+ int ret;
uint8_t *ptr;
if (buf_end - buf < 14)
@@ -72,13 +73,13 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if (p->data[0])
avctx->release_buffer(avctx, p);
- if (av_image_check_size(w, h, 0, avctx))
- return -1;
+ if ((ret = av_image_check_size(w, h, 0, avctx)) < 0)
+ return ret;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- if (ff_get_buffer(avctx, p) < 0) {
+ if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
- return -1;
+ return ret;
}
p->pict_type = AV_PICTURE_TYPE_I;