[FFmpeg-devel] [PATCH] matroskaenc: write tags.
Anton Khirnov
wyskas
Thu Mar 25 18:49:17 CET 2010
On Thu, Mar 25, 2010 at 04:25:34AM -0400, David Conrad wrote:
> On Mar 20, 2010, at 4:51 AM, Anton Khirnov wrote:
>
> > added a metadata conv table to the muxer + it now adds per-track/chapter
> > tags to the cluster seekhead, not main.
> >
> > Anton Khirnov
>
> Why can't all tags be stored in one level-one element? At least, I don't see from the spec why this wouldn't work.
>
right, it seems i misunderstood the specs. should be fixed.
> > + simpletag = start_ebml_master(s->pb, MATROSKA_ID_SIMPLETAG, 0);
> > + put_ebml_string(s->pb, MATROSKA_ID_TAGNAME, t->key);
> > + put_ebml_string(s->pb, MATROSKA_ID_TAGLANG, "und");
> > + put_ebml_uint( s->pb, MATROSKA_ID_TAGDEFAULT, 1);
>
> No need to write mandatory elements if we never use anything but the default value.
>
i though mantatory elements were mandatory ;) removed
> > + if (av_metadata_get(s->metadata, "", NULL, AV_METADATA_IGNORE_SUFFIX)) {
> > + ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_TAGS, url_ftell(s->pb));
> > + if (ret < 0) return ret;
> > +
> > + tags = start_ebml_master(s->pb, MATROSKA_ID_TAGS, 0);
> > +
> > + while ((t = av_metadata_get(s->metadata, "", t, AV_METADATA_IGNORE_SUFFIX)))
>
> Don't need the extra () here or down further.
gcc complains if i remove them.
Anton Khirnov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-matroskaenc-write-tags.patch
Type: text/x-diff
Size: 4037 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100325/96b8a989/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100325/96b8a989/attachment.pgp>
More information about the ffmpeg-devel
mailing list