From 80967c76381ec9abcd3b98cf9c0cf022953ad74e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20J=C3=B6nsson?= Date: Thu, 13 Mar 2014 09:37:48 +0100 Subject: [PATCH] gstrtph264pay: Reset sps pps variable when state change. Reset last_spspps and sps/pps arrays when state transition GST_STATE_CHANGE_PAUSED_TO_READY. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726015 --- gst/rtp/gstrtph264pay.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/rtp/gstrtph264pay.c b/gst/rtp/gstrtph264pay.c index 86c3570f67..5fb15cebe2 100644 --- a/gst/rtp/gstrtph264pay.c +++ b/gst/rtp/gstrtph264pay.c @@ -1245,6 +1245,10 @@ gst_rtp_h264_pay_change_state (GstElement * element, GstStateChange transition) rtph264pay->send_spspps = FALSE; gst_adapter_clear (rtph264pay->adapter); break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + rtph264pay->last_spspps = -1; + gst_rtp_h264_pay_clear_sps_pps (rtph264pay); + break; default: break; }