[FFmpeg-cvslog] lavf/vplayerdec: Improve auto-detection.

Clément Bœsch git at videolan.org
Fri Jul 15 10:36:38 CEST 2016


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Fri Jul 15 10:29:14 2016 +0200| [77726d32a872ad500434fd8799b289cf56215047] | committer: Carl Eugen Hoyos

lavf/vplayerdec: Improve auto-detection.

Fixes the incorrect detection of 16_selma_OneFrame_QP39.yuv (gray16le
rawvideo) as vplayer format.

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

 libavformat/vplayerdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/vplayerdec.c b/libavformat/vplayerdec.c
index 897c408..49943d0 100644
--- a/libavformat/vplayerdec.c
+++ b/libavformat/vplayerdec.c
@@ -36,8 +36,8 @@ static int vplayer_probe(AVProbeData *p)
     char c;
     const unsigned char *ptr = p->buf;
 
-    if ((sscanf(ptr, "%*d:%*d:%*d.%*d%c", &c) == 1 ||
-         sscanf(ptr, "%*d:%*d:%*d%c",     &c) == 1) && strchr(": =", c))
+    if ((sscanf(ptr, "%*3d:%*2d:%*2d.%*2d%c", &c) == 1 ||
+         sscanf(ptr, "%*3d:%*2d:%*2d%c",      &c) == 1) && strchr(": =", c))
         return AVPROBE_SCORE_MAX;
     return 0;
 }



More information about the ffmpeg-cvslog mailing list