mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-09 05:38:58 +00:00
flacenc: Fix NEWSEGMENT parsing logic and don't use uninitialized variables
This commit is contained in:
parent
342543325b
commit
5a4ecc5b6f
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue