GNOME Bugzilla – Bug 696549
wavparse: add 'note' chunk support
Last modified: 2013-04-09 20:57:13 UTC
Created attachment 239751 [details] [review] [PATCH] wavparse: add 'note' chunk support I'm added 'note' chunk support in TOC as GST_TAG_COMMENT. Not sure about commit message, please fix it. Also If you have any comments about patch, please leave.
This patch have mistake: if wav don't contain 'note' chunk, still appears comment. Trying fix this...
Created attachment 239928 [details] [review] [PATCH] wavparse: add 'note' chunk support Forgot break in switch, fixed. :) Now everything works nicely.
Review of attachment 239928 [details] [review]: Looks good to me. ::: gst/wavparse/gstwavparse.c @@ +1252,3 @@ + note->cue_point_id = GST_READ_UINT32_LE (data); + note->text = (gchar *) g_new0 (gchar *, size - 4 + 1); +{ you can use g_memdup() here to allocate and dup in one go.
Created attachment 240825 [details] [review] [PATCH] wavparse: add 'note' chunk support Used g_memdup() both in labl and in note parser.
Just read on the NOTE chunk again. This patch would concat all the notes into a single COMMENT chunk, not sure that would make sense. For other reviewers: http://www.sonicspot.com/guide/wavefiles.html#note
Review of attachment 240825 [details] [review]: ::: gst/wavparse/gstwavparse.c @@ +1383,3 @@ + } + gst_tag_list_add (tags, GST_TAG_MERGE_PREPEND, GST_TAG_COMMENT, + cur_subentry = gst_toc_find_entry (toc, id); This looks like duplicated code. Could you extract this into a little helper and use this here two times instead?
Created attachment 241089 [details] [review] [PATCH] wavparse: add 'note' chunk support Extracted duplicate code as function.
Thanks!