Message ID | 201705171103.42176.cehoyos@ag.or.at |
---|---|
State | Accepted |
Headers | show |
On 17 May 2017 at 10:03, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote: > Hi! > > I believe attached patch is necessary to allow reading svg sequences. > > Please comment, Carl Eugen > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > Hi, With this patch svg and svgz files aren't detected as such and demuxing and decoding fails.
2017-05-17 14:46 GMT+02:00 Rostislav Pehlivanov <atomnuker@gmail.com>: > On 17 May 2017 at 10:03, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote: > >> Hi! >> >> I believe attached patch is necessary to allow reading svg sequences. >> >> Please comment, Carl Eugen > With this patch svg and svgz files aren't detected as such and > demuxing and decoding fails. Solution would be to adapt the score in svg_probe(), it may be anything but 50 (same score -> no detection). Or do you think that sequences will never be useful? Carl Eugen
On 17 May 2017 at 13:58, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote: > 2017-05-17 14:46 GMT+02:00 Rostislav Pehlivanov <atomnuker@gmail.com>: > > On 17 May 2017 at 10:03, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote: > > > >> Hi! > >> > >> I believe attached patch is necessary to allow reading svg sequences. > >> > >> Please comment, Carl Eugen > > > With this patch svg and svgz files aren't detected as such and > > demuxing and decoding fails. > > Solution would be to adapt the score in svg_probe(), it may be anything > but 50 (same score -> no detection). > > So that's why everything in _probe() returns extension score + 1, now I get it. Could you amend this patch to do that as well and test it? If it works feel free to push.
2017-05-17 15:39 GMT+02:00 Rostislav Pehlivanov <atomnuker@gmail.com>: > On 17 May 2017 at 13:58, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote: > >> 2017-05-17 14:46 GMT+02:00 Rostislav Pehlivanov <atomnuker@gmail.com>: >> > On 17 May 2017 at 10:03, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote: >> > >> >> Hi! >> >> >> >> I believe attached patch is necessary to allow reading svg sequences. >> >> >> >> Please comment, Carl Eugen >> >> > With this patch svg and svgz files aren't detected as such and >> > demuxing and decoding fails. >> >> Solution would be to adapt the score in svg_probe(), it may be anything >> but 50 (same score -> no detection). >> > So that's why everything in _probe() returns extension score + 1, now > I get it. > Could you amend this patch to do that as well and test it? If it works > feel free to push. Tested the detection and pushed, thank you! Should we keep the ff_image_svg_pipe_demuxer? Or improve the probing by testing for "<!DOCTYPE"? Carl Eugen
diff --git a/libavformat/img2.c b/libavformat/img2.c index 29df4f0..8432cc0 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" },
Hi! I believe attached patch is necessary to allow reading svg sequences. Please comment, Carl Eugen From 4c2d49dbb1167d613528f5dd72883a218ad46b02 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <cehoyos@ag.or.at> Date: Wed, 17 May 2017 10:59:36 +0200 Subject: [PATCH] lavf/img2: Add svg and svgz to allow reading image sequences. --- libavformat/img2.c | 2 ++ 1 file changed, 2 insertions(+)