mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 14:38:48 +00:00
mp4gdepay: reset depayloader state
This commit is contained in:
parent
e8b8753c90
commit
1eb0f65f39
1 changed files with 14 additions and 9 deletions
|
@ -315,6 +315,18 @@ gst_rtp_mp4g_depay_clear_queue (GstRtpMP4GDepay * rtpmp4gdepay)
|
||||||
gst_buffer_unref (outbuf);
|
gst_buffer_unref (outbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_rtp_mp4g_depay_reset (GstRtpMP4GDepay * rtpmp4gdepay)
|
||||||
|
{
|
||||||
|
gst_adapter_clear (rtpmp4gdepay->adapter);
|
||||||
|
rtpmp4gdepay->max_AU_index = -1;
|
||||||
|
rtpmp4gdepay->next_AU_index = -1;
|
||||||
|
rtpmp4gdepay->prev_AU_index = -1;
|
||||||
|
rtpmp4gdepay->prev_rtptime = -1;
|
||||||
|
rtpmp4gdepay->last_AU_index = -1;
|
||||||
|
gst_rtp_mp4g_depay_clear_queue (rtpmp4gdepay);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_rtp_mp4g_depay_flush_queue (GstRtpMP4GDepay * rtpmp4gdepay)
|
gst_rtp_mp4g_depay_flush_queue (GstRtpMP4GDepay * rtpmp4gdepay)
|
||||||
{
|
{
|
||||||
|
@ -710,13 +722,7 @@ gst_rtp_mp4g_depay_change_state (GstElement * element,
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
gst_adapter_clear (rtpmp4gdepay->adapter);
|
gst_rtp_mp4g_depay_reset (rtpmp4gdepay);
|
||||||
rtpmp4gdepay->max_AU_index = -1;
|
|
||||||
rtpmp4gdepay->next_AU_index = -1;
|
|
||||||
rtpmp4gdepay->prev_AU_index = -1;
|
|
||||||
rtpmp4gdepay->prev_rtptime = -1;
|
|
||||||
rtpmp4gdepay->last_AU_index = -1;
|
|
||||||
rtpmp4gdepay->prev_AU_num = -1;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -726,8 +732,7 @@ gst_rtp_mp4g_depay_change_state (GstElement * element,
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
gst_adapter_clear (rtpmp4gdepay->adapter);
|
gst_rtp_mp4g_depay_reset (rtpmp4gdepay);
|
||||||
gst_rtp_mp4g_depay_clear_queue (rtpmp4gdepay);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue