[FFmpeg-devel] [PATCH 2/8] libutvideodec: Replace a silly stay constant

Derek Buitenhuis derek.buitenhuis at gmail.com
Mon Nov 7 18:20:23 CET 2011


Replace a silly '4*4' with a proper sizeof() call,
for setting the extradata size.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
 libavcodec/libutvideo.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/libutvideo.cpp b/libavcodec/libutvideo.cpp
index fa1bcc5..43b5209 100644
--- a/libavcodec/libutvideo.cpp
+++ b/libavcodec/libutvideo.cpp
@@ -53,7 +53,7 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
     UtVideoExtra info;
     int format;
 
-    if(avctx->extradata_size != 4*4)
+    if(avctx->extradata_size != sizeof(UtVideoExtra))
     {
         av_log(avctx, AV_LOG_ERROR, "Extradata size mismatch.\n");
         return -1;
-- 
1.7.7.1



More information about the ffmpeg-devel mailing list