[FFmpeg-cvslog] Remove useless NULL check.

Reimar Döffinger git at videolan.org
Tue Jul 26 22:35:16 CEST 2011


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Tue Jul 26 22:28:26 2011 +0200| [7cbb856efe6ccab7485bb96ad3887472a6519ffa] | committer: Reimar Döffinger

Remove useless NULL check.

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 at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7cbb856efe6ccab7485bb96ad3887472a6519ffa
---

 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];
     }
 



More information about the ffmpeg-cvslog mailing list