[vlc-commits] macosx: don' t continue playback where left off if user set a custom start-time

Felix Paul Kühne git at videolan.org
Sun May 18 19:21:40 CEST 2014


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun May 18 19:21:34 2014 +0200| [2d8ef3b23597fd7178e446d5279ff3093f4839b0] | committer: Felix Paul Kühne

macosx: don't continue playback where left off if user set a custom start-time

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2d8ef3b23597fd7178e446d5279ff3093f4839b0
---

 modules/gui/macosx/playlist.m |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index 9588a4b..217f82a 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -1479,6 +1479,14 @@
         if (!p_item)
             return;
 
+        /* allow the user to over-write the start-time */
+        if (p_item->i_options > 0) {
+            for (int x = 0; x < p_item->i_options; x++) {
+                if (strstr(p_item->ppsz_options[x],"start-time"))
+                    return;
+            }
+        }
+
         char *psz_url = decode_URI(input_item_GetURI(p_item));
         NSString *url = [NSString stringWithUTF8String:psz_url ? psz_url : ""];
         free(psz_url);
@@ -1491,7 +1499,7 @@
             long long int dur = input_item_GetDuration(p_item) / 1000000;
             int current_pos_in_sec = (f_current_pos * dur) / 100;
 
-            if (current_pos_in_sec == 0 || current_pos_in_sec >= lastPosition.intValue)
+            if (current_pos_in_sec >= lastPosition.intValue)
                 return;
 
             int settingValue = config_GetInt(VLCIntf, "macosx-continue-playback");



More information about the vlc-commits mailing list