[FFmpeg-devel] Make FLV decoder expose meta-data

Michael Niedermayer michaelni
Mon Jul 6 14:57:30 CEST 2009


First id like to thank aurel for the reviewing help :)

On Sun, Jul 05, 2009 at 02:24:23PM -0700, Art Clarke wrote:
> On Sun, Jul 5, 2009 at 7:21 AM, Aurelien Jacobs <aurel at gnuage.org> wrote:
[...]
> > > @@ -375,7 +382,7 @@
> > >          if ((flags & 0xf0) == 0x50) /* video info / command frame */
> > >              goto skip;
> > >      } else {
> > > -        if (type == FLV_TAG_TYPE_META && size > 13+1+4 && 0)
> > > +        if (type == FLV_TAG_TYPE_META && size > 13+1+4)
> > >              flv_read_metabody(s, next);
> >
> > This code was disabled in r18460 as a way to fix issue977 [1].
> > So this would re-open this issue. The audiosamplerate interpreting
> > code should probably be disabled/removed... (this belong in a
> > separate patch)
> >
> > Aurel
> >
> > [1] https://roundup.ffmpeg.org/roundup/ffmpeg/issue977
> >
> 
> 
> I wasn't aware of that issue, and it's a good catch.  I started a separate
> patch, but it ended up being (1) remove pretty much all the AMF parsing code
> that was there (like Michael did) and then (2) add most of it back in so as
> to set up the av_metadata stuff.  This seems silly since the old version of
> the code I'm patching already had removed it via Michael's && 0 check.
> 
> So instead, I submit a combined patch that I hope is simple enough  I nuked
> every piece of AVCodecContext and AVFormatContext data that the AMF parsing
> data was setting except for bit_rate and duration -- all others are
> correctly parsed from the FLV audio and video headers, and the onMetaData
> versions should be ignored.  Bit-rate and duration are needed because
> Michael's patch (r18460) had the undesirable side-effect that for
> network-streamed FLV files we lost these settings (but they are quite useful
> to have), and outside of reading the entire stream, those two items cannot
> be computed from the packet headers in FLV.

please split the patch in
1. remove parts of the old code (cosmetic as its disabled)
2. reenable the remaining (Bit-rate and duration) parsing
3. add your metadata code

(this would make debuging any bugs they might cause easier, and no
 ive no reason to belive they would but theres always a change that does
 and thats one of the reasons why nicely split patches and commits are
 better)

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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20090706/57a83011/attachment.pgp>



More information about the ffmpeg-devel mailing list