Changeset 491d41862114b95b7b35c79ee8d506ee7f9a1d71

Show
Ignore:
Timestamp:
10/08/08 19:44:30 (4 months ago)
Author:
Derk-Jan Hartman <hartman@videolan.org>
git-committer:
Derk-Jan Hartman <hartman@videolan.org> 1218390270 +0200
git-parent:

[924ef2774c975212d4b1a127a61b8d8bb4341b43]

git-author:
Derk-Jan Hartman <hartman@videolan.org> 1218389808 +0200
Message:

avformat: Fix DEMUX_SET_TIME

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/avformat/demux.c

    rb5c566d r491d418  
    431431        case DEMUX_SET_TIME: 
    432432            i64 = (int64_t)va_arg( args, int64_t ); 
     433            i64 = i64 *AV_TIME_BASE / 1000000; 
    433434            if( p_sys->ic->start_time != (int64_t)AV_NOPTS_VALUE ) 
    434435                i64 += p_sys->ic->start_time; 
     
    502503#endif 
    503504        case SEEK_SET: 
     505            i_absolute = (int64_t)offset; 
    504506            break; 
    505507        case SEEK_CUR: 
    506             i_absolute = stream_Tell( p_demux->s ) + offset; 
     508            i_absolute = stream_Tell( p_demux->s ) + (int64_t)offset; 
    507509            break; 
    508510        case SEEK_END: 
    509             i_absolute = i_size + offset; 
     511            i_absolute = i_size + (int64_t)offset; 
    510512            break; 
    511513        default: 
     
    516518        i_absolute = 0; 
    517519 
    518     if( i_size && i_absolute >= i_size ) 
     520    if( i_size > 0 && i_absolute >= i_size ) 
    519521    { 
    520522        msg_Dbg( p_demux, "Trying to seek too far : EOF?" );