[FFmpeg-devel] [PATCH] swfdec: support compressed swf.

Clément Bœsch ubitux at gmail.com
Tue Apr 3 07:25:36 CEST 2012


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)

> +            return AVERROR(ENOMEM);

[...]

-- 
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/0c89cc23/attachment.asc>


More information about the ffmpeg-devel mailing list