[FFmpeg-devel] [PATCH] Add writing of vorbis comments to flac files
Michael Niedermayer
michaelni
Sun Feb 14 11:23:59 CET 2010
On Sun, Feb 14, 2010 at 09:10:35AM +0100, Reimar D?ffinger wrote:
> On Sat, Feb 13, 2010 at 08:13:45PM -0500, Justin Ruggles wrote:
> > > +int flac_write_block_comment(ByteIOContext *pb, AVMetadata *m,
> > > + int last_block, int bitexact)
> > > +{
> > > + const char *vendor = bitexact ? "ffmpeg" : LIBAVFORMAT_IDENT;
> > > + unsigned int len;
> > > + uint8_t *p, *p0;
> > > +
> > > + len = ff_vorbiscomment_length(m, vendor);
> > > + p0 = av_malloc(len+4);
> > > + if (!p0)
> > > + return AVERROR(ENOMEM);
> > > + p = p0;
> > > +
> > > + bytestream_put_byte(&p, last_block ? 0x84 : 0x04);
> > > + bytestream_put_be24(&p, len);
> > > + ff_vorbiscomment_write(&p, m, vendor);
> >
> >
> > If the bitexact flag is set, you should pass NULL instead of m so that
> > tags are not written.
>
> I disagree, with bitexact no version-specific flags or similar should be created,
> but tags in general should be created, otherwise we can never regression-test
> that code.
actually we could store a generic "libavformat" without version
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- 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/20100214/e128d3c4/attachment.pgp>
More information about the ffmpeg-devel
mailing list