mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
videodecoder: Also change gst_video_decoder_get_oldest_frame() to return a new reference
This commit is contained in:
parent
4d7cd2e638
commit
ecd061e48c
1 changed files with 5 additions and 6 deletions
|
@ -2310,22 +2310,21 @@ gst_video_decoder_set_output_state (GstVideoDecoder * decoder,
|
|||
*
|
||||
* Get the oldest pending unfinished #GstVideoCodecFrame
|
||||
*
|
||||
* Returns: (transfer none): oldest pending unfinished #GstVideoCodecFrame.
|
||||
* Returns: (transfer full): oldest pending unfinished #GstVideoCodecFrame.
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
GstVideoCodecFrame *
|
||||
gst_video_decoder_get_oldest_frame (GstVideoDecoder * decoder)
|
||||
{
|
||||
GList *g;
|
||||
GstVideoCodecFrame *frame = NULL;
|
||||
|
||||
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
|
||||
g = decoder->priv->frames;
|
||||
if (decoder->priv->frames)
|
||||
frame = gst_video_codec_frame_ref (decoder->priv->frames->data);
|
||||
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
|
||||
|
||||
if (g == NULL)
|
||||
return NULL;
|
||||
return (GstVideoCodecFrame *) (g->data);
|
||||
return (GstVideoCodecFrame *) frame;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue