]> git.sesse.net Git - vlc/commitdiff
ccess/ftp.c: Fix ftp pausing. Patch by Andrew Zaikin <andrew.zaikin at gmail.com...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 6 Jan 2008 12:31:24 +0000 (12:31 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 6 Jan 2008 12:31:24 +0000 (12:31 +0000)
I can see that if you are watching video over ftp and you are pausing playback for a couple of minutes, VLC is unable to resume playback, because corresponding FTP data connection is closed (getting "connection reset by peer" error). To solve this issue I would propose to seek to the current position when VLC is resuming playback. Seek operation in ftp re-open data connection - that is exactly what we need here.

modules/access/ftp.c

index cb7f639fdad6aff15dd7ffff0a826cf4c26f81d4..fd8abeb6ca1d975e3de88105de2b3a16176a0f19 100644 (file)
@@ -550,7 +550,9 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
         /* */
         case ACCESS_SET_PAUSE_STATE:
-            /* Nothing to do */
+            pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
+            if ( !pb_bool )
+              return Seek( p_access, p_access->info.i_pos );
             break;
 
         case ACCESS_GET_TITLE_INFO: