avcodec/h264dec: remove unnecessary checks in h264_decode_frame
authorZhao Zhili <quinkblack@foxmail.com>
Thu, 6 Sep 2018 09:01:49 +0000 (17:01 +0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 7 Sep 2018 18:35:54 +0000 (20:35 +0200)
These conditions are checked again in is_extra(). This patch makes no
functional changes.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/h264dec.c

index 1f44ed1..7b4c5c7 100644 (file)
@@ -986,7 +986,7 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data,
                                      &h->ps, &h->is_avc, &h->nal_length_size,
                                      avctx->err_recognition, avctx);
     }
-    if(h->is_avc && buf_size >= 9 && buf[0]==1 && buf[2]==0 && (buf[4]&0xFC)==0xFC && (buf[5]&0x1F) && buf[8]==0x67){
+    if (h->is_avc && buf_size >= 9 && buf[0]==1 && buf[2]==0 && (buf[4]&0xFC)==0xFC) {
         if (is_extra(buf, buf_size))
             return ff_h264_decode_extradata(buf, buf_size,
                                             &h->ps, &h->is_avc, &h->nal_length_size,