mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
rtph265depay: Drain on EOS event
This commit is contained in:
parent
65b01d5f02
commit
0524e6f8cd
1 changed files with 24 additions and 0 deletions
|
@ -109,6 +109,12 @@ static gboolean gst_rtp_h265_depay_setcaps (GstRTPBaseDepayload * filter,
|
|||
GstCaps * caps);
|
||||
static gboolean gst_rtp_h265_depay_handle_event (GstRTPBaseDepayload * depay,
|
||||
GstEvent * event);
|
||||
static GstBuffer *gst_rtp_h265_complete_au (GstRtpH265Depay * rtph265depay,
|
||||
GstClockTime * out_timestamp, gboolean * out_keyframe);
|
||||
static void gst_rtp_h265_depay_push (GstRtpH265Depay * rtph265depay,
|
||||
GstBuffer * outbuf, gboolean keyframe, GstClockTime timestamp,
|
||||
gboolean marker);
|
||||
|
||||
|
||||
static void
|
||||
gst_rtp_h265_depay_class_init (GstRtpH265DepayClass * klass)
|
||||
|
@ -181,6 +187,21 @@ gst_rtp_h265_depay_reset (GstRtpH265Depay * rtph265depay, gboolean hard)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtp_h265_depay_drain (GstRtpH265Depay * rtph265depay)
|
||||
{
|
||||
GstClockTime timestamp;
|
||||
gboolean keyframe;
|
||||
GstBuffer *outbuf;
|
||||
|
||||
if (!rtph265depay->picture_start)
|
||||
return;
|
||||
|
||||
outbuf = gst_rtp_h265_complete_au (rtph265depay, ×tamp, &keyframe);
|
||||
if (outbuf)
|
||||
gst_rtp_h265_depay_push (rtph265depay, outbuf, keyframe, timestamp, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtp_h265_depay_finalize (GObject * object)
|
||||
{
|
||||
|
@ -1573,6 +1594,9 @@ gst_rtp_h265_depay_handle_event (GstRTPBaseDepayload * depay, GstEvent * event)
|
|||
case GST_EVENT_FLUSH_STOP:
|
||||
gst_rtp_h265_depay_reset (rtph265depay, FALSE);
|
||||
break;
|
||||
case GST_EVENT_EOS:
|
||||
gst_rtp_h265_depay_drain (rtph265depay);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue