lavf/srtdec: simplify start/end computation.
[ffmpeg.git] / libavformat / h264dec.c
index 3f5ed5e..9c67ab9 100644 (file)
@@ -54,7 +54,7 @@ static int h264_probe(AVProbeData *p)
             case     1:   sli++; break;
             case     5:   idr++; break;
             case     7:
-                if(p->buf[i+2]&0x0F)
+                if (p->buf[i + 2] & 0x03)
                     return 0;
                 sps++;
                 break;
@@ -67,14 +67,4 @@ static int h264_probe(AVProbeData *p)
     return 0;
 }
 
-AVInputFormat ff_h264_demuxer = {
-    "h264",
-    NULL_IF_CONFIG_SMALL("raw H.264 video format"),
-    0,
-    h264_probe,
-    ff_raw_video_read_header,
-    ff_raw_read_partial_packet,
-    .flags= AVFMT_GENERIC_INDEX,
-    .extensions = "h26l,h264,264", //FIXME remove after writing mpeg4_probe
-    .value = CODEC_ID_H264,
-};
+FF_DEF_RAWVIDEO_DEMUXER(h264 , "raw H.264 video", h264_probe, "h26l,h264,264", AV_CODEC_ID_H264)