mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
videoencoder: _get_oldest_frame: return a reference
This commit is contained in:
parent
67a4c0c7b2
commit
4d7cd2e638
1 changed files with 5 additions and 6 deletions
|
@ -1642,22 +1642,21 @@ gst_video_encoder_get_latency (GstVideoEncoder * encoder,
|
|||
*
|
||||
* Get the oldest unfinished pending #GstVideoCodecFrame
|
||||
*
|
||||
* Returns: oldest unfinished pending #GstVideoCodecFrame
|
||||
* Returns: (transfer full): oldest unfinished pending #GstVideoCodecFrame
|
||||
*
|
||||
* Since: 0.10.36
|
||||
*/
|
||||
GstVideoCodecFrame *
|
||||
gst_video_encoder_get_oldest_frame (GstVideoEncoder * encoder)
|
||||
{
|
||||
GList *g;
|
||||
GstVideoCodecFrame *frame = NULL;
|
||||
|
||||
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
|
||||
g = encoder->priv->frames;
|
||||
if (encoder->priv->frames)
|
||||
frame = gst_video_codec_frame_ref (encoder->priv->frames->data);
|
||||
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
|
||||
|
||||
if (g == NULL)
|
||||
return NULL;
|
||||
return (GstVideoCodecFrame *) (g->data);
|
||||
return (GstVideoCodecFrame *) frame;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue