From c16c22e4c1833dfc36c60ff6adcb2b9052138ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 10 Nov 2005 12:22:30 +0000 Subject: [PATCH] gst/matroska/matroska-mux.c: Don't try to ready buffer duration from buffer that we don't own any longer and that mi... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message from CVS: Reviewed by: Tim-Philipp Müller * gst/matroska/matroska-mux.c: (gst_matroska_mux_write_data): Don't try to ready buffer duration from buffer that we don't own any longer and that might already have been unreffed. (#321136) --- ChangeLog | 9 +++++++++ gst/matroska/matroska-mux.c | 6 ++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b717517041..1ff78f16eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-11-10 Josef Zlomek + + Reviewed by: Tim-Philipp Müller + + * gst/matroska/matroska-mux.c: (gst_matroska_mux_write_data): + Don't try to ready buffer duration from buffer that we don't + own any longer and that might already have been unreffed. + (#321136) + 2005-11-09 Zeeshan Ali * gst/flx/gstflxdec.c: (flx_decode_delta_fli), diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 78dcf960cf..84d59a967a 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -1324,6 +1324,7 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux) guint64 cluster, blockgroup; gboolean write_duration; guint16 relative_timestamp; + guint64 block_duration; /* which stream to write from? */ best = gst_matroska_mux_best_pad (mux); @@ -1424,9 +1425,8 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux) /* Check if the duration differs from the default duration. */ write_duration = FALSE; + block_duration = GST_BUFFER_DURATION (buf); if (GST_BUFFER_DURATION_IS_VALID (buf)) { - guint64 block_duration = GST_BUFFER_DURATION (buf); - if (block_duration != best->track->default_duration) { write_duration = TRUE; } @@ -1460,8 +1460,6 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux) gst_ebml_write_buffer (ebml, hdr); gst_ebml_write_buffer (ebml, buf); if (write_duration) { - guint64 block_duration = GST_BUFFER_DURATION (buf); - gst_ebml_write_uint (ebml, GST_MATROSKA_ID_BLOCKDURATION, block_duration / mux->time_scale); }