From 2dde1af88d9628fac33fd4f3439afbdaa6eba974 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 5 May 2013 19:02:27 +0200 Subject: stream_bluray: make code a bit more obvious --- stream/stream_bluray.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'stream') diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c index 81fd882f86..f0fd37b7b7 100644 --- a/stream/stream_bluray.c +++ b/stream/stream_bluray.c @@ -213,13 +213,13 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg) si = ti->clips[0].pg_streams; break; } - while (count-- > 0) { - if (si->pid == req->id) { - snprintf(req->name, sizeof(req->name), "%.4s", si->lang); + for (int n = 0; n < count; n++) { + BLURAY_STREAM_INFO *i = &si[n]; + if (i->pid == req->id) { + snprintf(req->name, sizeof(req->name), "%.4s", i->lang); bd_free_title_info(ti); return STREAM_OK; } - si++; } } bd_free_title_info(ti); -- cgit v1.2.3