summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesper Larsen <knorr.jesper@gmail.com>2015-04-30 14:43:04 +0200
committerTim-Philipp Müller <tim@centricular.com>2016-05-13 09:55:45 +0100
commitce05adfb30cbb48da5f9d3226f4fb0172684fe26 (patch)
tree457acd06d6d7883a7fbc1543ef32103e114dadba
parentf89c4f9f4b405c1ebc19041cb15087cefa738776 (diff)
avimux: Do not write index and header if idx is NULL
Fixes criticals with e.g. videotestsrc num-buffers=1 ! identity drop-probability=1.0 ! avimux ! fakesink https://bugzilla.gnome.org/show_bug.cgi?id=748700
-rw-r--r--gst/avi/gstavimux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c
index 6dc767ffb..e5aa43716 100644
--- a/gst/avi/gstavimux.c
+++ b/gst/avi/gstavimux.c
@@ -1784,6 +1784,10 @@ gst_avi_mux_stop_file (GstAviMux * avimux)
GSList *node;
GstSegment segment;
+ /* Do not write index and header, if the index has no data */
+ if (avimux->idx == NULL)
+ return GST_FLOW_OK;
+
/* if bigfile, rewrite header, else write indexes */
/* don't bail out at once if error, still try to re-write header */
if (avimux->video_pads > 0) {