[FFmpeg-devel,2/4] avformat/vivo: improve probing of some files

Submitted by Paul B Mahol on May 16, 2019, 9:43 a.m.

Details

Message ID 20190516094307.27247-2-onemda@gmail.com
State New
Headers show

Commit Message

Paul B Mahol May 16, 2019, 9:43 a.m.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavformat/vivo.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer May 17, 2019, 6 p.m.
On Thu, May 16, 2019 at 11:43:05AM +0200, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
>  libavformat/vivo.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

LGTM

thx

[...]

Patch hide | download patch | download mbox

diff --git a/libavformat/vivo.c b/libavformat/vivo.c
index 9a07c43849..1b1bfaffc7 100644
--- a/libavformat/vivo.c
+++ b/libavformat/vivo.c
@@ -59,9 +59,10 @@  static int vivo_probe(const AVProbeData *p)
     if (c & 0x80 || length > 1024 || length < 21)
         return 0;
 
-    if (memcmp(buf, "\r\nVersion:Vivo/", 15))
+    buf += 2;
+    if (memcmp(buf, "Version:Vivo/", 13))
         return 0;
-    buf += 15;
+    buf += 13;
 
     if (*buf < '0' || *buf > '2')
         return 0;