summaryrefslogtreecommitdiff
path: root/gst/asfmux
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2013-11-29 13:22:56 +0000
committerTim-Philipp Müller <tim@centricular.com>2013-11-29 13:22:56 +0000
commitbc7989071fbee7959a21860192aacf5dcc6ce31b (patch)
tree56194a9a6e941a492fd284aae38a81017bf72e02 /gst/asfmux
parent00dec2e74368dba0f6efbeeb99ae4a0112c019d9 (diff)
downloadgstreamer-plugins-bad-bc7989071fbee7959a21860192aacf5dcc6ce31b.tar.gz
asfmux: don't use buffer after giving away ownership
https://bugzilla.gnome.org/show_bug.cgi?id=719553
Diffstat (limited to 'gst/asfmux')
-rw-r--r--gst/asfmux/gstasfmux.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/asfmux/gstasfmux.c b/gst/asfmux/gstasfmux.c
index 21bb14c2e..1ed0e0707 100644
--- a/gst/asfmux/gstasfmux.c
+++ b/gst/asfmux/gstasfmux.c
@@ -376,9 +376,13 @@ static GstFlowReturn
gst_asf_mux_push_buffer (GstAsfMux * asfmux, GstBuffer * buf)
{
GstFlowReturn ret;
+ gsize bufsize = gst_buffer_get_size (buf);
+
ret = gst_pad_push (asfmux->srcpad, buf);
+
if (ret == GST_FLOW_OK)
- asfmux->file_size += gst_buffer_get_size (buf);
+ asfmux->file_size += bufsize;
+
return ret;
}