flvmux: only store the last buffer timestamp if it's valid
authorJan Urbański <wulczer@wulczer.org>
Mon, 10 May 2010 20:11:10 +0000 (22:11 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 11 May 2010 04:35:48 +0000 (06:35 +0200)
Fixes bug #618305

gst/flv/gstflvmux.c

index 4a59fc8..883ebb7 100644 (file)
@@ -1193,7 +1193,7 @@ gst_flv_mux_write_buffer (GstFlvMux * mux, GstFlvPad * cpad)
 
   ret = gst_flv_mux_push (mux, tag);
 
-  if (ret == GST_FLOW_OK)
+  if (ret == GST_FLOW_OK && GST_BUFFER_TIMESTAMP_IS_VALID (tag))
     cpad->last_timestamp = GST_BUFFER_TIMESTAMP (tag);
 
   return ret;