[FFmpeg-cvslog] lavf/img2: Add svg and svgz to allow reading image sequences.

Carl Eugen Hoyos git at videolan.org
Mon May 22 02:11:54 EEST 2017


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Mon May 22 01:09:21 2017 +0200| [7f60dc03a0b88de78298bb57834d9fbc68926b64] | committer: Carl Eugen Hoyos

lavf/img2: Add svg and svgz to allow reading image sequences.

Increase the return value for svg_probe() to make it != AVPROBE_SCORE_EXTENSION.

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

 libavformat/img2.c    | 2 ++
 libavformat/img2dec.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/img2.c b/libavformat/img2.c
index 29df4f04e2..8432cc0955 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -65,6 +65,8 @@ const IdStrMap ff_img_tags[] = {
     { AV_CODEC_ID_SUNRAST,    "im24"     },
     { AV_CODEC_ID_SUNRAST,    "im32"     },
     { AV_CODEC_ID_SUNRAST,    "sunras"   },
+    { AV_CODEC_ID_SVG,        "svg"      },
+    { AV_CODEC_ID_SVG,        "svgz"     },
     { AV_CODEC_ID_JPEG2000,   "j2c"      },
     { AV_CODEC_ID_JPEG2000,   "jp2"      },
     { AV_CODEC_ID_JPEG2000,   "jpc"      },
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 23be175387..19cae87fdb 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -876,7 +876,7 @@ static int sunrast_probe(AVProbeData *p)
 static int svg_probe(AVProbeData *p)
 {
     if (av_match_ext(p->filename, "svg") || av_match_ext(p->filename, "svgz"))
-        return AVPROBE_SCORE_EXTENSION;
+        return AVPROBE_SCORE_EXTENSION + 1;
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list