mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-19 20:46:22 +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
|
* Get the oldest unfinished pending #GstVideoCodecFrame
|
||||||
*
|
*
|
||||||
* Returns: oldest unfinished pending #GstVideoCodecFrame
|
* Returns: (transfer full): oldest unfinished pending #GstVideoCodecFrame
|
||||||
*
|
*
|
||||||
* Since: 0.10.36
|
* Since: 0.10.36
|
||||||
*/
|
*/
|
||||||
GstVideoCodecFrame *
|
GstVideoCodecFrame *
|
||||||
gst_video_encoder_get_oldest_frame (GstVideoEncoder * encoder)
|
gst_video_encoder_get_oldest_frame (GstVideoEncoder * encoder)
|
||||||
{
|
{
|
||||||
GList *g;
|
GstVideoCodecFrame *frame = NULL;
|
||||||
|
|
||||||
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
|
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);
|
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
|
||||||
|
|
||||||
if (g == NULL)
|
return (GstVideoCodecFrame *) frame;
|
||||||
return NULL;
|
|
||||||
return (GstVideoCodecFrame *) (g->data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue