diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-02-01 16:58:51 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-02-01 17:00:33 +0100 |
commit | 99298da3d50f5d0881008d3fa690df9ad708e467 (patch) | |
tree | 093aef2fd8879bcd6e190314dd93d72e3be75b09 | |
parent | 43ade6cf71aec4435d74f43b52888d6615f22ffe (diff) | |
download | gst-plugins-bad-99298da3d50f5d0881008d3fa690df9ad708e467.tar.gz gst-plugins-bad-99298da3d50f5d0881008d3fa690df9ad708e467.tar.bz2 gst-plugins-bad-99298da3d50f5d0881008d3fa690df9ad708e467.zip |
Fix deadlocks when seeking in pull mode failed and check new offset before using it
-rw-r--r-- | gst/mxf/mxfdemux.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index de1f3a0e..70b89135 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -2883,7 +2883,10 @@ gst_mxf_demux_seek_pull (GstMXFDemux * demux, GstEvent * event) } p->discont = TRUE; } - demux->offset = new_offset; + if (new_offset == -1) + goto no_new_offset; + + demux->offset = new_offset + demux->run_in; } if (G_UNLIKELY (demux->close_seg_event)) { @@ -2946,10 +2949,16 @@ wrong_rate: } unresolved_metadata: { + GST_PAD_STREAM_UNLOCK (demux->sinkpad); GST_WARNING_OBJECT (demux, "metadata can't be resolved"); return FALSE; } - +no_new_offset: + { + GST_PAD_STREAM_UNLOCK (demux->sinkpad); + GST_WARNING_OBJECT (demux, "can't find new offset"); + return FALSE; + } } static gboolean |