[gst-cvs] gst-plugins-bad: qtmux: do not add size to the pointer variable
Thiago Sousa Santos
thiagoss at kemper.freedesktop.org
Tue Nov 17 18:13:21 PST 2009
Module: gst-plugins-bad
Branch: master
Commit: b53243fed3d1644aa3b219a6d3a36168939be831
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=b53243fed3d1644aa3b219a6d3a36168939be831
Author: Thiago Sousa Santos <thiagoss at redmoon.(none)>
Date: Mon Nov 16 14:57:53 2009 -0300
qtmux: do not add size to the pointer variable
Do not wrongly add the result of the function to the
pointer to the buffer size. Instead, check the result
to see if the serialization was ok.
Based on a patch by: "Carsten Kroll <car at ximidi.com>"
Fixes #602106
---
gst/qtmux/atoms.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/gst/qtmux/atoms.c b/gst/qtmux/atoms.c
index a0844c2..57b9aa4 100644
--- a/gst/qtmux/atoms.c
+++ b/gst/qtmux/atoms.c
@@ -1909,11 +1909,15 @@ 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);
+ if (!sample_entry_mp4v_copy_data ((SampleTableEntryMP4V *)
+ walker->data, buffer, size, offset)) {
+ return 0;
+ }
} else if (se->kind == AUDIO) {
- size += sample_entry_mp4a_copy_data ((SampleTableEntryMP4A *)
- walker->data, buffer, size, offset);
+ if (!sample_entry_mp4a_copy_data ((SampleTableEntryMP4A *)
+ walker->data, buffer, size, offset)) {
+ return 0;
+ }
} else {
if (!atom_hint_sample_entry_copy_data (
(AtomHintSampleEntry *) walker->data, buffer, size, offset)) {
More information about the Gstreamer-commits
mailing list