[vlc-devel] commit: Fix avformat mux Seek() : return sout_AccessOutSeek() result ( Rafaël Carré )

git version control git at videolan.org
Wed Nov 11 20:17:23 CET 2009


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Wed Nov 11 20:15:17 2009 +0100| [72be12b3fe00e0ddb68163955d04e2dedfe0980e] | committer: Rafaël Carré 

Fix avformat mux Seek() : return sout_AccessOutSeek() result

>= 0 means success (could be the new offset)
-1 = error

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

 modules/demux/avformat/mux.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index 4dbb17e..54a79e0 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -483,7 +483,6 @@ static int64_t IOSeek( void *opaque, int64_t offset, int whence )
 {
     URLContext *p_url = opaque;
     sout_mux_t *p_mux = p_url->priv_data;
-    int64_t i_absolute;
 
 #ifdef AVFORMAT_DEBUG
     msg_Dbg( p_mux, "IOSeek offset: %"PRId64", whence: %i", offset, whence );
@@ -492,18 +491,10 @@ static int64_t IOSeek( void *opaque, int64_t offset, int whence )
     switch( whence )
     {
     case SEEK_SET:
-        i_absolute = offset;
-        break;
+        return sout_AccessOutSeek( p_mux->p_access, offset );
     case SEEK_CUR:
     case SEEK_END:
     default:
         return -1;
     }
-
-    if( sout_AccessOutSeek( p_mux->p_access, i_absolute ) )
-    {
-        return -1;
-    }
-
-    return 0;
 }




More information about the vlc-devel mailing list