[FFmpeg-devel] [PATCH] fix swf playback with bad audio track

Michael Niedermayer michaelni
Sun Sep 16 23:28:22 CEST 2007


Hi

On Sun, Sep 16, 2007 at 11:13:22PM +0200, Aurelien Jacobs wrote:
> On Sun, 16 Sep 2007 20:20:05 +0200
> Baptiste Coudurier <baptiste.coudurier at smartjog.com> wrote:
> 
> > Hi
> > 
> > Michael Niedermayer wrote:
> > > Hi
> > > 
> > > On Sun, Sep 16, 2007 at 06:16:32PM +0200, Baptiste Coudurier wrote:
> > > [...]
> > > 
> > >>This is ugly indeed. Maybe we could just output the big packet with
> > >>AVSTREAM_PARSE_FULL which will split out audio frames, and let the user
> > >>application correctly interleave video and audio frames based on dts.
> > > 
> > > 
> > > yes
> > > 
> > > 
> > > 
> > >>Also lavf could do it in a generic way after parsing, 
> > > 
> > > 
> > > no
> > > 
> > > either the file is approximately interleaved, in which case packets are
> > > output as is or
> > > its completely non interleaved in which case the demuxer must interleave
> > > things properly by reading just what is output
> > 
> > So, audio data must be read by a small amount at a time (would be
> > audio_packet_size), and the parser should be set to AVSTREAM_PARSE_FULL
> > to reconstruct frames from those small data chunks, it must not read the
> > whole audio chunk which can be potentially big.
> > 
> > Right ?

i dont know DEFINESOUND so well maybe ...
if DEFINESOUND is limited to some sane size (~1sec audio) then just outputing
the whole chunks and letting the AVParser deal with it should be fine
if OTOH the thing can contain 1min audio or so then yes you are right the
demuxer has to split and interleave audio and video
and in that case aurels patch might not be that bad ...
i thought that DEFINESOUND would not contains hours of sound in a single
continuous chunk such design would be sick and my review was based on the
assumtation that the design wasnt that sick ...


> 
> I think it's right, but the hard part IMO is to find out how much audio
> and video data must be read each time in order to keep A/V sync.
> IOW, find out audio packets boundaries, and how much audio samples will
> be decoded out of each packet.

the container should contain the needed information, doesnt it?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070916/257a2732/attachment.pgp>



More information about the ffmpeg-devel mailing list