aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitaliy E Sugrobov <vsugrob@hotmail.com>2012-11-30 12:58:57 +0400
committerPaul B Mahol <onemda@gmail.com>2012-11-30 14:35:11 +0000
commitf83657fcf609e9ac5d290e0a54de2c0d1b818797 (patch)
tree3931fc5a13942b87b8067cdda926d54a97ae8431
parent5603b2bf6e00f0f7d96448535f9fe6c293308225 (diff)
downloadffmpeg-f83657fcf609e9ac5d290e0a54de2c0d1b818797.tar.gz
Add exception for "gif" in image2 probe() method.
Without this exception files with ".gif" extension by default recognized as input suitable for image2 demuxer rather than gif. In order to pass image through gif demuxer it was necessary to use -f gif option. This change affected 'make fate' test results because previously image2 demuxer and gif decoder took only first frame of multiframe test data, which is no longer true with gif demuxer. Signed-off-by: Vitaliy E Sugrobov <vsugrob@hotmail.com>
-rw-r--r--libavformat/img2dec.c2
-rw-r--r--tests/ref/lavf/gif2
-rw-r--r--tests/ref/seek/lavf_gif54
3 files changed, 29 insertions, 29 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 47c0de32d4..f492bba829 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -181,7 +181,7 @@ static int img_read_probe(AVProbeData *p)
return AVPROBE_SCORE_MAX;
else if (is_glob(p->filename))
return AVPROBE_SCORE_MAX;
- else if(av_match_ext(p->filename, "raw"))
+ else if (av_match_ext(p->filename, "raw") || av_match_ext(p->filename, "gif"))
return 5;
else
return AVPROBE_SCORE_MAX / 2;
diff --git a/tests/ref/lavf/gif b/tests/ref/lavf/gif
index 19106cac9a..41d5018187 100644
--- a/tests/ref/lavf/gif
+++ b/tests/ref/lavf/gif
@@ -1,6 +1,6 @@
e6089fd4ef3b9df44090ab3650bdd810 *./tests/data/lavf/lavf.gif
2906401 ./tests/data/lavf/lavf.gif
-./tests/data/lavf/lavf.gif CRC=0xe5605ff6
+./tests/data/lavf/lavf.gif CRC=0xbf89a246
022dc66b5068404e88c618ce79d9eb5f *./tests/data/images/gif/02.gif
./tests/data/images/gif/%02d.gif CRC=0x032e0034
81538 ./tests/data/images/gif/02.gif
diff --git a/tests/ref/seek/lavf_gif b/tests/ref/seek/lavf_gif
index 883f18761e..809987878e 100644
--- a/tests/ref/seek/lavf_gif
+++ b/tests/ref/seek/lavf_gif
@@ -1,27 +1,27 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:2906401
-ret:-EINVAL st:-1 flags:0 ts:-1.000000
-ret:-EINVAL st:-1 flags:1 ts: 1.894167
-ret:-EINVAL st: 0 flags:0 ts: 0.800000
-ret:-EINVAL st: 0 flags:1 ts:-0.320000
-ret:-EINVAL st:-1 flags:0 ts: 2.576668
-ret:-EINVAL st:-1 flags:1 ts: 1.470835
-ret:-EINVAL st: 0 flags:0 ts: 0.360000
-ret:-EINVAL st: 0 flags:1 ts:-0.760000
-ret:-EINVAL st:-1 flags:0 ts: 2.153336
-ret:-EINVAL st:-1 flags:1 ts: 1.047503
-ret:-EINVAL st: 0 flags:0 ts:-0.040000
-ret:-EINVAL st: 0 flags:1 ts: 2.840000
-ret:-EINVAL st:-1 flags:0 ts: 1.730004
-ret:-EINVAL st:-1 flags:1 ts: 0.624171
-ret:-EINVAL st: 0 flags:0 ts:-0.480000
-ret:-EINVAL st: 0 flags:1 ts: 2.400000
-ret:-EINVAL st:-1 flags:0 ts: 1.306672
-ret:-EINVAL st:-1 flags:1 ts: 0.200839
-ret:-EINVAL st: 0 flags:0 ts:-0.920000
-ret:-EINVAL st: 0 flags:1 ts: 2.000000
-ret:-EINVAL st:-1 flags:0 ts: 0.883340
-ret:-EINVAL st:-1 flags:1 ts:-0.222493
-ret:-EINVAL st: 0 flags:0 ts: 2.680000
-ret:-EINVAL st: 0 flags:1 ts: 1.560000
-ret:-EINVAL st:-1 flags:0 ts: 0.460008
-ret:-EINVAL st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:117024
+ret:-1 st:-1 flags:0 ts:-1.000000
+ret:-1 st:-1 flags:1 ts: 1.894167
+ret:-1 st: 0 flags:0 ts: 0.790000
+ret:-1 st: 0 flags:1 ts:-0.320000
+ret:-1 st:-1 flags:0 ts: 2.576668
+ret:-1 st:-1 flags:1 ts: 1.470835
+ret:-1 st: 0 flags:0 ts: 0.370000
+ret:-1 st: 0 flags:1 ts:-0.740000
+ret:-1 st:-1 flags:0 ts: 2.153336
+ret:-1 st:-1 flags:1 ts: 1.047503
+ret:-1 st: 0 flags:0 ts:-0.060000
+ret:-1 st: 0 flags:1 ts: 2.840000
+ret:-1 st:-1 flags:0 ts: 1.730004
+ret:-1 st:-1 flags:1 ts: 0.624171
+ret:-1 st: 0 flags:0 ts:-0.480000
+ret:-1 st: 0 flags:1 ts: 2.410000
+ret:-1 st:-1 flags:0 ts: 1.306672
+ret:-1 st:-1 flags:1 ts: 0.200839
+ret:-1 st: 0 flags:0 ts:-0.900000
+ret:-1 st: 0 flags:1 ts: 1.990000
+ret:-1 st:-1 flags:0 ts: 0.883340
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.670000
+ret:-1 st: 0 flags:1 ts: 1.570000
+ret:-1 st:-1 flags:0 ts: 0.460008
+ret:-1 st:-1 flags:1 ts:-0.645825