[FFmpeg-devel] [PATCH] Remove useless NULL check.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Jul 26 22:29:52 CEST 2011


We dereferenced the pointer two lines above, no point in
checking for NULL afterwards.
In addition it cannot be NULL the way it was initialized
a few lines further above.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavcodec/dv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index bfd5ae4..bd9290a 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -1109,7 +1109,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
     vsc_pack = buf + 80*5 + 48 + 5;
     if ( *vsc_pack == dv_video_control ) {
         apt = buf[4] & 0x07;
-        is16_9 = (vsc_pack && ((vsc_pack[2] & 0x07) == 0x02 || (!apt && (vsc_pack[2] & 0x07) == 0x07)));
+        is16_9 = (vsc_pack[2] & 0x07) == 0x02 || (!apt && (vsc_pack[2] & 0x07) == 0x07);
         avctx->sample_aspect_ratio = s->sys->sar[is16_9];
     }
 
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list