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>
pull/8/head
Vitaliy E Sugrobov 12 years ago committed by Paul B Mahol
parent 5603b2bf6e
commit f83657fcf6
  1. 2
      libavformat/img2dec.c
  2. 2
      tests/ref/lavf/gif
  3. 54
      tests/ref/seek/lavf_gif

@ -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;

@ -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

@ -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

Loading…
Cancel
Save