[gst-cvs] gst-plugins-bad: [qtmux] Fixes segfault when adding a blob as first tag.
Thiago Sousa Santos
thiagoss at kemper.freedesktop.org
Fri May 15 05:22:38 PDT 2009
Module: gst-plugins-bad
Branch: master
Commit: 405f80dec487103dfe52e6ce6aa3fb05db74e495
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=405f80dec487103dfe52e6ce6aa3fb05db74e495
Author: Thiago Santos <thiagoss at embedded.ufcg.edu.br>
Date: Fri May 15 01:54:44 2009 -0300
[qtmux] Fixes segfault when adding a blob as first tag.
Moves tags data initialization to the function that actually appends
the tags to the list. Fixes #582702
Also fixes some style caught by the pre-commit hook.
---
gst/qtmux/atoms.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/gst/qtmux/atoms.c b/gst/qtmux/atoms.c
index df6958e..a5d8fe3 100644
--- a/gst/qtmux/atoms.c
+++ b/gst/qtmux/atoms.c
@@ -1855,13 +1855,11 @@ atom_stsd_copy_data (AtomSTSD * stsd, guint8 ** buffer, guint64 * size,
break;
default:
if (se->kind == VIDEO) {
- size +=
- sample_entry_mp4v_copy_data ((SampleTableEntryMP4V *) walker->
- data, buffer, size, offset);
+ size += sample_entry_mp4v_copy_data ((SampleTableEntryMP4V *)
+ walker->data, buffer, size, offset);
} else if (se->kind == AUDIO) {
- size +=
- sample_entry_mp4a_copy_data ((SampleTableEntryMP4A *) walker->
- data, buffer, size, offset);
+ size += sample_entry_mp4a_copy_data ((SampleTableEntryMP4A *)
+ walker->data, buffer, size, offset);
} else {
if (!atom_hint_sample_entry_copy_data (
(AtomHintSampleEntry *) walker->data, buffer, size, offset)) {
@@ -2547,6 +2545,7 @@ atom_moov_append_tag (AtomMOOV * moov, AtomInfo * tag)
{
AtomILST *ilst;
+ atom_moov_init_metatags (moov);
ilst = moov->udta->meta->ilst;
ilst->entries = g_list_append (ilst->entries, tag);
}
@@ -2563,7 +2562,6 @@ atom_moov_add_tag (AtomMOOV * moov, guint32 fourcc, guint32 flags,
atom_tag_data_alloc_data (tdata, size);
g_memmove (tdata->data, data, size);
- atom_moov_init_metatags (moov);
atom_moov_append_tag (moov,
build_atom_info_wrapper ((Atom *) tag, atom_tag_copy_data,
atom_tag_free));
More information about the Gstreamer-commits
mailing list