From 5d87f68f6ccbb7675c542dbd58fda4050e9ee43b Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 5 Jan 2016 08:59:26 -0300 Subject: [PATCH] hlsdemux: simplify snap flags checking Replace: if (boolean) var = true; with: var = (boolean); --- ext/hls/gsthlsdemux.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index 184f2ef6ec..713ab8e12b 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -309,12 +309,10 @@ gst_hls_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek) /* Snap to segment boundary. Improves seek performance on slow machines. */ snap_before = snap_after = snap_nearest = FALSE; keyunit = flags & GST_SEEK_FLAG_KEY_UNIT; - if ((flags & GST_SEEK_FLAG_SNAP_NEAREST) == GST_SEEK_FLAG_SNAP_NEAREST) - snap_nearest = TRUE; - else if (flags & GST_SEEK_FLAG_SNAP_BEFORE) - snap_before = TRUE; - else if (flags & GST_SEEK_FLAG_SNAP_AFTER) - snap_after = TRUE; + snap_nearest = + (flags & GST_SEEK_FLAG_SNAP_NEAREST) == GST_SEEK_FLAG_SNAP_NEAREST; + snap_before = flags & GST_SEEK_FLAG_SNAP_BEFORE; + snap_after = flags & GST_SEEK_FLAG_SNAP_AFTER; /* FIXME: Here we need proper discont handling */ for (walk = hlsdemux->client->current->files; walk; walk = walk->next) {