[FFmpeg-devel] [PATCH]lavf/cavsvideodec: Return a lower score if only one frame was found
Carl Eugen Hoyos
cehoyos at ag.or.at
Wed Mar 1 10:40:08 EET 2017
Hi!
Attached patch fixes ticket #6208.
Please comment, Carl Eugen
-------------- next part --------------
From 901443bd61d33f62a4fd904aad5f270d0a018a8a Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos at ag.or.at>
Date: Wed, 1 Mar 2017 09:35:16 +0100
Subject: [PATCH 2/2] lavf/cavsvideodec: Return a lower score if only one
frame was found.
Fixes ticket #6208.
---
libavformat/cavsvideodec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/cavsvideodec.c b/libavformat/cavsvideodec.c
index b4da58e..fa920ad 100644
--- a/libavformat/cavsvideodec.c
+++ b/libavformat/cavsvideodec.c
@@ -61,8 +61,11 @@ static int cavsvideo_probe(AVProbeData *p)
}
}
}
- if(seq && seq*9<=pic*10)
+ if (seq && seq * 9 <= pic * 10 && pic > 1) {
return AVPROBE_SCORE_EXTENSION+1;
+ } else if (seq && seq * 9 <= pic * 10) {
+ return AVPROBE_SCORE_EXTENSION - 1;
+ }
return 0;
}
--
1.7.10.4
More information about the ffmpeg-devel
mailing list