[FFmpeg-devel] [PATCH 2] add tag/comment support to the raw flac demuxer
Wed Dec 10 10:08:15 CET 2008
On Tue, Dec 09, 2008 at 01:38:33PM -0800, Jim Radford wrote:
> On Thu, 4 Dec 2008 at 21:44:51, Reimar D?ffinger wrote:
> > On Mon, Dec 01, 2008 at 02:18:02PM -0800, Jim Radford wrote:
> > > This patch adds support for parsing vorbis comments in plain flac
> > > streams. Only metadata packets are parsed leaving the frame data to
> > > be parsed in raw 1024 byte chunks like before.
> > > + init_get_bits(&gb, header, ret*8);
> > > + flac->metadata_done = get_bits(&gb, 1);
> > > + type = get_bits(&gb, 7);
> > > + length = get_bits(&gb, 24);
> > Seems very much like overkill to use get_bits here. Actually
> > get_be32 to me seems much more appropriate than get_buffer to get
> > the header anyway.
> I thought so too, but given that I need to copy the data back into the
> stream where it needs to be in its original endian, so the code
> doesn't get any simpler.
Nonsense, AV_WB32 is simpler and possibly a lot faster than memcpy
(depends on whether the compiler inlines his own memcpy variant).
More information about the ffmpeg-devel