mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
rtph264depay: Drain on EOS event
This commit is contained in:
parent
d12128f527
commit
e694e2752a
1 changed files with 23 additions and 0 deletions
|
@ -93,6 +93,11 @@ static gboolean gst_rtp_h264_depay_setcaps (GstRTPBaseDepayload * filter,
|
|||
GstCaps * caps);
|
||||
static gboolean gst_rtp_h264_depay_handle_event (GstRTPBaseDepayload * depay,
|
||||
GstEvent * event);
|
||||
static GstBuffer *gst_rtp_h264_complete_au (GstRtpH264Depay * rtph264depay,
|
||||
GstClockTime * out_timestamp, gboolean * out_keyframe);
|
||||
static void gst_rtp_h264_depay_push (GstRtpH264Depay * rtph264depay,
|
||||
GstBuffer * outbuf, gboolean keyframe, GstClockTime timestamp,
|
||||
gboolean marker);
|
||||
|
||||
static void
|
||||
gst_rtp_h264_depay_class_init (GstRtpH264DepayClass * klass)
|
||||
|
@ -159,6 +164,21 @@ gst_rtp_h264_depay_reset (GstRtpH264Depay * rtph264depay, gboolean hard)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtp_h264_depay_drain (GstRtpH264Depay * rtph264depay)
|
||||
{
|
||||
GstClockTime timestamp;
|
||||
gboolean keyframe;
|
||||
GstBuffer *outbuf;
|
||||
|
||||
if (!rtph264depay->picture_start)
|
||||
return;
|
||||
|
||||
outbuf = gst_rtp_h264_complete_au (rtph264depay, ×tamp, &keyframe);
|
||||
if (outbuf)
|
||||
gst_rtp_h264_depay_push (rtph264depay, outbuf, keyframe, timestamp, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtp_h264_depay_finalize (GObject * object)
|
||||
{
|
||||
|
@ -1286,6 +1306,9 @@ gst_rtp_h264_depay_handle_event (GstRTPBaseDepayload * depay, GstEvent * event)
|
|||
case GST_EVENT_FLUSH_STOP:
|
||||
gst_rtp_h264_depay_reset (rtph264depay, FALSE);
|
||||
break;
|
||||
case GST_EVENT_EOS:
|
||||
gst_rtp_h264_depay_drain (rtph264depay);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue