]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/yop.c
ffmpeg: init simple filter graph before trying to extract framerate from its output.
[ffmpeg] / libavformat / yop.c
index e8f4e8e6ab825bf43dabe235590b2a25ae2f7709..c7d3f651925a80a1072e757441e255a1b1d77dab 100644 (file)
@@ -38,10 +38,15 @@ typedef struct yop_dec_context {
 static int yop_probe(AVProbeData *probe_packet)
 {
     if (AV_RB16(probe_packet->buf) == AV_RB16("YO")  &&
+        probe_packet->buf[2]<10                      &&
+        probe_packet->buf[3]<10                      &&
         probe_packet->buf[6]                         &&
         probe_packet->buf[7]                         &&
         !(probe_packet->buf[8] & 1)                  &&
-        !(probe_packet->buf[10] & 1))
+        !(probe_packet->buf[10] & 1)                 &&
+        AV_RL16(probe_packet->buf + 12 + 6) >= 920    &&
+        AV_RL16(probe_packet->buf + 12 + 6) < probe_packet->buf[12] * 3 + 4 + probe_packet->buf[7] * 2048
+    )
         return AVPROBE_SCORE_MAX * 3 / 4;
 
     return 0;