diff options
author | Edward Hervey <edward@centricular.com> | 2017-07-20 14:17:48 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2017-07-20 14:18:51 +0200 |
commit | 78ee0dfad13ea6e3621605e482321e5f34ffa6c3 (patch) | |
tree | 60035af9ba0cd6c4dbe93ee577f1b0b07b26f6c7 /plugins | |
parent | 1b0059e0c5ae4de4c02d8b849e1d440431f60cb5 (diff) |
multiqueue: Fix access to NULL pointer
sq can be NULL.
Also fix commit message (it's the queue we are iterating over that we
are logging, not the one passed as argument).
CID #1415569
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/elements/gstmultiqueue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index b2d7d4415..64cc07bc2 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -1301,7 +1301,7 @@ calculate_interleave (GstMultiQueue * mq, GstSingleQueue * sq) } GST_LOG_OBJECT (mq, "queue %d , sinktime:%" GST_STIME_FORMAT " low:%" GST_STIME_FORMAT - " high:%" GST_STIME_FORMAT, sq->id, + " high:%" GST_STIME_FORMAT, oq->id, GST_STIME_ARGS (oq->cached_sinktime), GST_STIME_ARGS (low), GST_STIME_ARGS (high)); } @@ -1310,7 +1310,8 @@ calculate_interleave (GstMultiQueue * mq, GstSingleQueue * sq) interleave = high - low; /* Padding of interleave and minimum value */ interleave = (150 * interleave / 100) + mq->min_interleave_time; - sq->interleave = interleave; + if (sq) + sq->interleave = interleave; interleave = MAX (interleave, other_interleave); |