Commit 535f92a0 authored by Thiago Santos's avatar Thiago Santos

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.
parent 31acc88b
...@@ -2748,6 +2748,7 @@ atom_trak_update_bitrates (AtomTRAK * trak, guint32 avg_bitrate, ...@@ -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, ...@@ -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;
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment