[vlc-commits] commit: Cosmetics. (Laurent Aimar )

git at videolan.org git at videolan.org
Thu Apr 15 18:54:45 CEST 2010


vlc/vlc-1.0 | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Feb 27 10:27:14 2010 +0100| [405e9936fe290847ac045e36083e87cd2a94a176] | committer: Rémi Denis-Courmont 

Cosmetics.

(cherry picked from commit b4f08e46d879bdfedd784e002399598e1405e51e)
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.0.git/?a=commit;h=405e9936fe290847ac045e36083e87cd2a94a176
---

 modules/demux/asf/asf.c |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 1f63bbd..e1c6c5c 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -225,6 +225,14 @@ static void Close( vlc_object_t * p_this )
 /*****************************************************************************
  * SeekIndex: goto to i_date or i_percent
  *****************************************************************************/
+static int SeekPercent( demux_t *p_demux, int i_query, va_list args )
+{
+    demux_sys_t *p_sys = p_demux->p_sys;
+    return demux_vaControlHelper( p_demux->s, p_sys->i_data_begin,
+                                   p_sys->i_data_end, p_sys->i_bitrate,
+                                   p_sys->p_fp->i_min_data_packet_size,
+                                   i_query, args );
+}
 static int SeekIndex( demux_t *p_demux, mtime_t i_date, float f_pos )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
@@ -232,7 +240,7 @@ static int SeekIndex( demux_t *p_demux, mtime_t i_date, float f_pos )
     int64_t i_pos;
 
     msg_Dbg( p_demux, "seek with index: %i seconds, position %f",
-             (int)(i_date/1000000), f_pos );
+             i_date >= 0 ? (int)(i_date/1000000) : -1, f_pos );
 
     p_index = ASF_FindObject( p_sys->p_root, &asf_object_index_guid, 0 );
 
@@ -296,10 +304,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         }
         else
         {
-            return demux_vaControlHelper( p_demux->s, p_sys->i_data_begin,
-                                           p_sys->i_data_end, p_sys->i_bitrate,
-                                           p_sys->p_fp->i_min_data_packet_size,
-                                           i_query, args );
+            return SeekPercent( p_demux, i_query, args );
         }
 
     case DEMUX_GET_POSITION:
@@ -325,10 +330,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         }
         else
         {
-            return demux_vaControlHelper( p_demux->s, p_sys->i_data_begin,
-                                           p_sys->i_data_end, p_sys->i_bitrate,
-                                           p_sys->p_fp->i_min_data_packet_size,
-                                           i_query, args );
+            return SeekPercent( p_demux, i_query, args );
         }
 
     case DEMUX_GET_META:



More information about the vlc-commits mailing list