[FFmpeg-devel] [PATCH] swfdec: support compressed swf.
Clément Bœsch
ubitux at gmail.com
Tue Apr 3 19:25:55 CEST 2012
On Tue, Apr 03, 2012 at 10:17:50AM +0200, Michael Niedermayer wrote:
> On Tue, Apr 03, 2012 at 07:25:36AM +0200, Clément Bœsch wrote:
> > On Tue, Apr 03, 2012 at 01:33:56AM +0200, Clément Bœsch wrote:
> > > ---
> > > libavformat/swf.h | 11 ++++++++
> > > libavformat/swfdec.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++---
> > > 2 files changed, 79 insertions(+), 4 deletions(-)
> > >
> > [...]
> > > tag = avio_rb32(pb) & 0xffffff00;
> > > + avio_rl32(pb);
> > >
> > > if (tag == MKBETAG('C', 'W', 'S', 0)) {
> > > - av_log(s, AV_LOG_ERROR, "Compressed SWF format not supported\n");
> > > + av_log(s, AV_LOG_INFO, "SWF compressed file detected\n");
> > > +#if CONFIG_ZLIB
> > > + swf->zbuf_in = av_malloc(ZBUF_SIZE);
> > > + swf->zbuf_out = av_malloc(ZBUF_SIZE);
> > > + swf->zpb = avio_alloc_context(swf->zbuf_out, ZBUF_SIZE, 0, s,
> > > + zlib_refill, NULL, NULL);
> > > + if (!swf->zpb)
> >
> > locally changed into if (!swf->zbuf_in || !swf->zbuf_out || !swf->zpb)
>
> patch LGTM
>
Pushed with an extra check for Z_STREAM_END in case of unexpected end of
stream (happened a few times in ~1k samples, leading to infinite loop).
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120403/ad8120f0/attachment.asc>
More information about the ffmpeg-devel
mailing list