[FFmpeg-devel] [PATCH] Parse DEFINESOUND tags in swf (fix ticket 1638)

Michael Niedermayer michaelni at gmx.at
Fri Oct 12 17:38:51 CEST 2012


On Thu, Oct 11, 2012 at 07:51:36PM -0600, Michael Bradshaw wrote:
> On Tue, Oct 9, 2012 at 8:32 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Tue, Oct 09, 2012 at 07:24:01PM -0600, Michael Bradshaw wrote:
> >> On Tue, Oct 9, 2012 at 1:57 PM, Michael Niedermayer <michaelni at gmx.at>wrote:
> >>
> >> > On Tue, Oct 09, 2012 at 10:34:34AM -0600, Michael Bradshaw wrote:
> >> > > +            ast->time_base.num = 1;
> >> > > +            ast->time_base.den = ast->codec->sample_rate;
> >> >
> >> > these 2 should be redundant
> >> >
> >>  Ah, thanks, I'll send an updated patch in a bit.
> >>
> >> > +            ast->duration = avio_rl32(pb); // number of samples
> >> > > +            if (((v>>4) & 15) == 2) { // MP3 sound data record
> >> > > +                ast->skip_samples = avio_rl16(pb);
> >> > > +                len -= 2;
> >> > > +            }
> >> > > +            len -= 7;
> >> >
> >> > > +            if ((res = av_get_packet(pb, pkt, len)) < 0)
> >> > > +                return res;
> >> >
> >> > can this chunk be big ? i mean 100mb or so ?
> >> > if this happens in realworld files its probably better to split in
> >> > some fixed size packets to reduce memory need and latency until its
> >> > fully loaded
> >> >
> >>  Technically, yeah, it could be big. The entire sound file is stored as a
> >> single chunk. This was my main worry. In practice, they aren't that big,
> >> seeing as they're typically shorter audio clips loaded onto the stage, but
> >> it's possible someone could do that. I saw your comment on the ticket and
> >> wanted to put together a working patch, at least, because adding that
> >> (which I think is a good idea in the end) would require some logic changes
> >> to the demuxer I believe, and I don't have a lot of time to figure out how
> >> to nicely fit it all together.
> >
> > agree its better to support it this way than not at all but please add
> > a FIXME comment or something that ideally this should be split into
> > multiple packets
> 
> Ok, I've attached an updated patch. It might conflict a bit with
> Clément's patch that adds the TAG_DEFINESOUND macro too.
> 
> Thanks,
> 
> Michael

>  swf.h    |    1 +
>  swfdec.c |   38 ++++++++++++++++++++++++++++++++++++++
>  2 files changed, 39 insertions(+)
> ccd83ee473c9b37f1c2070228bde60e27ad0aeaa  0001-Parse-DEFINESOUND-tags-in-swf-fix-ticket-1638.patch
> From 6efe1edfa0ad3313ab8a079cc659801528bfcbdf Mon Sep 17 00:00:00 2001
> From: Michael Bradshaw <mbradshaw at sorensonmedia.com>
> Date: Thu, 11 Oct 2012 19:48:44 -0600
> Subject: [PATCH] Parse DEFINESOUND tags in swf (fix ticket 1638)

patch applied

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121012/d6405b76/attachment.asc>


More information about the ffmpeg-devel mailing list