mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
qtmux: update esds atom under wave atom for aac bitrates
AAC in mov format puts an ESDS atom inside of a WAVE atom in STSD atom, we need to update the bitrate on this ESDS. This patch fixes it.
This commit is contained in:
parent
31acc88b39
commit
535f92a0a4
1 changed files with 15 additions and 0 deletions
|
@ -2748,6 +2748,7 @@ atom_trak_update_bitrates (AtomTRAK * trak, guint32 avg_bitrate,
|
||||||
{
|
{
|
||||||
AtomESDS *esds = NULL;
|
AtomESDS *esds = NULL;
|
||||||
AtomData *btrt = NULL;
|
AtomData *btrt = NULL;
|
||||||
|
AtomWAVE *wave = NULL;
|
||||||
AtomSTSD *stsd;
|
AtomSTSD *stsd;
|
||||||
GList *iter;
|
GList *iter;
|
||||||
GList *extensioniter = NULL;
|
GList *extensioniter = NULL;
|
||||||
|
@ -2783,6 +2784,20 @@ atom_trak_update_bitrates (AtomTRAK * trak, guint32 avg_bitrate,
|
||||||
esds = (AtomESDS *) atominfo->atom;
|
esds = (AtomESDS *) atominfo->atom;
|
||||||
} else if (atominfo->atom->type == FOURCC_btrt) {
|
} else if (atominfo->atom->type == FOURCC_btrt) {
|
||||||
btrt = (AtomData *) atominfo->atom;
|
btrt = (AtomData *) atominfo->atom;
|
||||||
|
} else if (atominfo->atom->type == FOURCC_wave) {
|
||||||
|
wave = (AtomWAVE *) atominfo->atom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* wave might have an esds internally */
|
||||||
|
if (wave) {
|
||||||
|
for (extensioniter = wave->extension_atoms; extensioniter;
|
||||||
|
extensioniter = g_list_next (extensioniter)) {
|
||||||
|
AtomInfo *atominfo = extensioniter->data;
|
||||||
|
if (atominfo->atom->type == FOURCC_esds) {
|
||||||
|
esds = (AtomESDS *) atominfo->atom;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue