Commit 72be12b3 authored by Rafaël Carré's avatar Rafaël Carré

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

>= 0 means success (could be the new offset)
-1 = error
parent 8433e306
...@@ -483,7 +483,6 @@ static int64_t IOSeek( void *opaque, int64_t offset, int whence ) ...@@ -483,7 +483,6 @@ static int64_t IOSeek( void *opaque, int64_t offset, int whence )
{ {
URLContext *p_url = opaque; URLContext *p_url = opaque;
sout_mux_t *p_mux = p_url->priv_data; sout_mux_t *p_mux = p_url->priv_data;
int64_t i_absolute;
#ifdef AVFORMAT_DEBUG #ifdef AVFORMAT_DEBUG
msg_Dbg( p_mux, "IOSeek offset: %"PRId64", whence: %i", offset, whence ); 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 ) ...@@ -492,18 +491,10 @@ static int64_t IOSeek( void *opaque, int64_t offset, int whence )
switch( whence ) switch( whence )
{ {
case SEEK_SET: case SEEK_SET:
i_absolute = offset; return sout_AccessOutSeek( p_mux->p_access, offset );
break;
case SEEK_CUR: case SEEK_CUR:
case SEEK_END: case SEEK_END:
default: default:
return -1; return -1;
} }
if( sout_AccessOutSeek( p_mux->p_access, i_absolute ) )
{
return -1;
}
return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment