mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
[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.
This commit is contained in:
parent
f5ba4904f7
commit
405f80dec4
1 changed files with 5 additions and 7 deletions
|
@ -1855,13 +1855,11 @@ atom_stsd_copy_data (AtomSTSD * stsd, guint8 ** buffer, guint64 * size,
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (se->kind == VIDEO) {
|
if (se->kind == VIDEO) {
|
||||||
size +=
|
size += sample_entry_mp4v_copy_data ((SampleTableEntryMP4V *)
|
||||||
sample_entry_mp4v_copy_data ((SampleTableEntryMP4V *) walker->
|
walker->data, buffer, size, offset);
|
||||||
data, buffer, size, offset);
|
|
||||||
} else if (se->kind == AUDIO) {
|
} else if (se->kind == AUDIO) {
|
||||||
size +=
|
size += sample_entry_mp4a_copy_data ((SampleTableEntryMP4A *)
|
||||||
sample_entry_mp4a_copy_data ((SampleTableEntryMP4A *) walker->
|
walker->data, buffer, size, offset);
|
||||||
data, buffer, size, offset);
|
|
||||||
} else {
|
} else {
|
||||||
if (!atom_hint_sample_entry_copy_data (
|
if (!atom_hint_sample_entry_copy_data (
|
||||||
(AtomHintSampleEntry *) walker->data, buffer, size, offset)) {
|
(AtomHintSampleEntry *) walker->data, buffer, size, offset)) {
|
||||||
|
@ -2547,6 +2545,7 @@ atom_moov_append_tag (AtomMOOV * moov, AtomInfo * tag)
|
||||||
{
|
{
|
||||||
AtomILST *ilst;
|
AtomILST *ilst;
|
||||||
|
|
||||||
|
atom_moov_init_metatags (moov);
|
||||||
ilst = moov->udta->meta->ilst;
|
ilst = moov->udta->meta->ilst;
|
||||||
ilst->entries = g_list_append (ilst->entries, tag);
|
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);
|
atom_tag_data_alloc_data (tdata, size);
|
||||||
g_memmove (tdata->data, data, size);
|
g_memmove (tdata->data, data, size);
|
||||||
|
|
||||||
atom_moov_init_metatags (moov);
|
|
||||||
atom_moov_append_tag (moov,
|
atom_moov_append_tag (moov,
|
||||||
build_atom_info_wrapper ((Atom *) tag, atom_tag_copy_data,
|
build_atom_info_wrapper ((Atom *) tag, atom_tag_copy_data,
|
||||||
atom_tag_free));
|
atom_tag_free));
|
||||||
|
|
Loading…
Reference in a new issue