Commit 5a4ecc5b authored by Sebastian Dröge's avatar Sebastian Dröge

flacenc: Fix NEWSEGMENT parsing logic and don't use uninitialized variables

parent 34254332
......@@ -1064,8 +1064,10 @@ gst_flac_enc_sink_event (GstPad * pad, GstEvent * event)
&stream_time);
} else {
start = -1;
stream_time = -1;
}
if (start != 0) {
if (start > 0) {
if (flacenc->offset > 0)
GST_DEBUG ("Not handling mid-stream newsegment event");
else
......@@ -1076,9 +1078,11 @@ gst_flac_enc_sink_event (GstPad * pad, GstEvent * event)
ret = gst_pad_push_event (flacenc->srcpad, e);
}
if (stream_time != 0) {
if (stream_time > 0) {
GST_DEBUG ("Not handling non-zero stream time");
}
gst_event_unref (event);
/* don't push it downstream, we'll generate our own via seek to 0 */
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment