[FFmpeg-cvslog] Add exception for "gif" in image2 probe() method.

Vitaliy E Sugrobov git at videolan.org
Fri Nov 30 15:59:47 CET 2012


ffmpeg | branch: master | Vitaliy E Sugrobov <vsugrob at hotmail.com> | Fri Nov 30 12:58:57 2012 +0400| [f83657fcf609e9ac5d290e0a54de2c0d1b818797] | committer: Paul B Mahol

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 at hotmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f83657fcf609e9ac5d290e0a54de2c0d1b818797
---

 libavformat/img2dec.c   |    2 +-
 tests/ref/lavf/gif      |    2 +-
 tests/ref/seek/lavf_gif |   54 +++++++++++++++++++++++------------------------
 3 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 47c0de3..f492bba 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 19106ca..41d5018 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 883f187..8099878 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



More information about the ffmpeg-cvslog mailing list