[FFmpeg-devel] [PATCH 1/2] exr: use buf_size instead of recalculating same value

Paul B Mahol onemda at gmail.com
Tue Jul 10 03:31:09 CEST 2012


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavcodec/exr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 6388794..113eb88 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -173,7 +173,7 @@ static int decode_frame(AVCodecContext *avctx,
     s->channel_offsets[3] = -1;
     s->bits_per_color_id = -1;
 
-    if (buf_end - buf < 10) {
+    if (buf_size < 10) {
         av_log(avctx, AV_LOG_ERROR, "Too short header to parse\n");
         return -1;
     }
-- 
1.7.7



More information about the ffmpeg-devel mailing list