From 29b7c8d9920725729d6acb5b7795cd65f8cae00a Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 3 Sep 2009 16:33:42 +0200 Subject: [PATCH] fix skipping forward/backward --- lib/dvb/tstools.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/dvb/tstools.cpp b/lib/dvb/tstools.cpp index 06e8ba0f..a9eef406 100644 --- a/lib/dvb/tstools.cpp +++ b/lib/dvb/tstools.cpp @@ -662,7 +662,8 @@ int eDVBTSTools::findNextPicture(off_t &offset, size_t &len, int &distance, int off_t new_offset = offset; size_t new_len = len; - + int first = 1; + while (distance > 0) { int dir = direction; @@ -676,8 +677,9 @@ int eDVBTSTools::findNextPicture(off_t &offset, size_t &len, int &distance, int // eDebug("we moved %d, %d to go frames (now at %llx)", dir, distance, new_offset); - if (distance >= 0) + if (distance >= 0 || first) { + first = 0; offset = new_offset; len = new_len; nr_frames += abs(dir); -- 2.30.2