videodecoder: Fix a leak introduced in fcb63e

CID: 1402055
This commit is contained in:
Jan Schmidt 2017-03-06 19:14:48 +11:00
parent 8596ec23cb
commit 052d34478f

View file

@ -1921,8 +1921,6 @@ gst_video_decoder_add_buffer_info (GstVideoDecoder * decoder,
GstVideoDecoderPrivate *priv = decoder->priv; GstVideoDecoderPrivate *priv = decoder->priv;
Timestamp *ts; Timestamp *ts;
ts = g_slice_new (Timestamp);
if (!GST_BUFFER_PTS_IS_VALID (buffer) && if (!GST_BUFFER_PTS_IS_VALID (buffer) &&
!GST_BUFFER_DTS_IS_VALID (buffer) && !GST_BUFFER_DTS_IS_VALID (buffer) &&
!GST_BUFFER_DURATION_IS_VALID (buffer) && !GST_BUFFER_DURATION_IS_VALID (buffer) &&
@ -1932,6 +1930,8 @@ gst_video_decoder_add_buffer_info (GstVideoDecoder * decoder,
return; return;
} }
ts = g_slice_new (Timestamp);
GST_LOG_OBJECT (decoder, GST_LOG_OBJECT (decoder,
"adding PTS %" GST_TIME_FORMAT " DTS %" GST_TIME_FORMAT "adding PTS %" GST_TIME_FORMAT " DTS %" GST_TIME_FORMAT
" (offset:%" G_GUINT64_FORMAT ")", " (offset:%" G_GUINT64_FORMAT ")",