git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b570835
)
avformat/swfdec: return AVPROBE_SCORE_MAX / 4 for unexpected versions
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 10 Nov 2013 11:53:38 +0000
(12:53 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 10 Nov 2013 12:25:35 +0000
(13:25 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/swfdec.c
patch
|
blob
|
history
diff --git
a/libavformat/swfdec.c
b/libavformat/swfdec.c
index
aa6ce84
..
e6ceec8
100644
(file)
--- a/
libavformat/swfdec.c
+++ b/
libavformat/swfdec.c
@@
-59,11
+59,14
@@
static int swf_probe(AVProbeData *p)
return 0;
/* check file header */
return 0;
/* check file header */
- if ((p->buf[0] == 'F' || p->buf[0] == 'C') && p->buf[1] == 'W' &&
- p->buf[2] == 'S' && p->buf[3] < 20)
- return AVPROBE_SCORE_MAX;
- else
+ if ( AV_RB24(p->buf) != AV_RB24("CWS")
+ && AV_RB24(p->buf) != AV_RB24("FWS"))
return 0;
return 0;
+
+ if (p->buf[3] >= 20)
+ return AVPROBE_SCORE_MAX / 4;
+
+ return AVPROBE_SCORE_MAX;
}
#if CONFIG_ZLIB
}
#if CONFIG_ZLIB