mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
smartencoder: Only accept TIME segments for real
... and don't try to push pending data without ever having received a SEGMENT event before EOS https://bugzilla.gnome.org/show_bug.cgi?id=765541
This commit is contained in:
parent
155222017a
commit
7ba7c58f99
1 changed files with 6 additions and 2 deletions
|
@ -356,9 +356,12 @@ smart_encoder_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (smart_encoder, "segment: %" GST_SEGMENT_FORMAT,
|
GST_DEBUG_OBJECT (smart_encoder, "segment: %" GST_SEGMENT_FORMAT,
|
||||||
smart_encoder->segment);
|
smart_encoder->segment);
|
||||||
if (smart_encoder->segment->format != GST_FORMAT_TIME)
|
if (smart_encoder->segment->format != GST_FORMAT_TIME) {
|
||||||
GST_ERROR
|
GST_ERROR
|
||||||
("smart_encoder can not handle streams not specified in GST_FORMAT_TIME");
|
("smart_encoder can not handle streams not specified in GST_FORMAT_TIME");
|
||||||
|
gst_event_unref (event);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* And keep a copy for further usage */
|
/* And keep a copy for further usage */
|
||||||
if (smart_encoder->newsegment)
|
if (smart_encoder->newsegment)
|
||||||
|
@ -368,6 +371,7 @@ smart_encoder_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
GST_DEBUG ("Eos, flushing remaining data");
|
GST_DEBUG ("Eos, flushing remaining data");
|
||||||
|
if (smart_encoder->segment->format == GST_FORMAT_TIME)
|
||||||
gst_smart_encoder_push_pending_gop (smart_encoder);
|
gst_smart_encoder_push_pending_gop (smart_encoder);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue