OSDN Git Service

Remove useless NULL check.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Tue, 26 Jul 2011 20:28:26 +0000 (22:28 +0200)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Tue, 26 Jul 2011 20:34:44 +0000 (22:34 +0200)
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
just one line further above.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
libavcodec/dv.c

index bfd5ae4..bd9290a 100644 (file)
@@ -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];
     }