diff options
Diffstat (limited to 'mencoder.c')
-rw-r--r-- | mencoder.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mencoder.c b/mencoder.c index 47b0efb8a1..de862fac48 100644 --- a/mencoder.c +++ b/mencoder.c @@ -77,13 +77,8 @@ #include "stream/stream_dvd.h" #endif -#ifdef CONFIG_DVDNAV #include "stream/stream_dvdnav.h" -#endif - -#ifdef CONFIG_LIBAVCODEC #include "libavcodec/avcodec.h" -#endif #include "libmpcodecs/ae.h" #include "options.h" @@ -1419,7 +1414,8 @@ if(sh_audio && !demuxer2){ { float t=(GetTimerMS()-timer_start)*0.001f; float len=(demuxer->movi_end-demuxer->movi_start); - float p=len>1000 ? (float)(demuxer->filepos-demuxer->movi_start) / len : + off_t pos = demuxer->filepos >= 0 ? demuxer->filepos : stream_tell(demuxer->stream); + float p=len>1000 ? (float)(pos-demuxer->movi_start) / len : (demuxer_get_percent_pos(demuxer) / 100.0); #if 0 if(!len && sh_audio && sh_audio->audio.dwLength>100){ |