diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-02 00:45:12 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-02 00:45:12 +0000 |
commit | ec12b2922cac2ed7ac598f858c583471899a4f65 (patch) | |
tree | 0e5cdd777d917c55ff95eaccc1074944707d6fac /mencoder.c | |
parent | 9ac9c08a9f41048ed29e418af8d6083a44207986 (diff) | |
download | mpv-ec12b2922cac2ed7ac598f858c583471899a4f65.tar.bz2 mpv-ec12b2922cac2ed7ac598f858c583471899a4f65.tar.xz |
cleanup of .AVI timestamp calculation (ugly hack from mplayer.c removed,
instead doing it in demux_avi.c, storing private data in priv insteda of
demuxer structs)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8031 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mencoder.c')
-rw-r--r-- | mencoder.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mencoder.c b/mencoder.c index ade41f9398..a857c1a726 100644 --- a/mencoder.c +++ b/mencoder.c @@ -647,7 +647,7 @@ if ((force_fourcc != NULL) && (strlen(force_fourcc) >= 4)) mux_v->bih->biCompression, (char *)&mux_v->bih->biCompression); } -if(demuxer->file_format!=DEMUXER_TYPE_AVI) pts_from_bps=0; // it must be 0 for mpeg/asf! +//if(demuxer->file_format!=DEMUXER_TYPE_AVI) pts_from_bps=0; // it must be 0 for mpeg/asf! // ============= AUDIO =============== if(sh_audio){ @@ -1053,6 +1053,7 @@ if(skip_flag>0){ if(sh_audio && !demuxer2){ float AV_delay,x; // A-V sync! +#if 0 if(pts_from_bps){ unsigned int samples=(sh_audio->audio.dwSampleSize)? ((ds_tell(d_audio)-sh_audio->a_in_buffer_len)/sh_audio->audio.dwSampleSize) : @@ -1060,7 +1061,9 @@ if(sh_audio && !demuxer2){ // printf("samples=%d \n",samples); a_pts=samples*(float)sh_audio->audio.dwScale/(float)sh_audio->audio.dwRate; delay_corrected=1; - } else { + } else +#endif + { // PTS = (last timestamp) + (bytes after last timestamp)/(bytes per sec) a_pts=d_audio->pts; if(!delay_corrected) if(a_pts) delay_corrected=1; @@ -1103,10 +1106,12 @@ 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 : 0; +#if 0 if(!len && sh_audio && sh_audio->audio.dwLength>100){ p=(sh_audio->audio.dwSampleSize? ds_tell(sh_audio->ds)/sh_audio->audio.dwSampleSize : sh_audio->ds->block_no) / (float)(sh_audio->audio.dwLength); } +#endif #if 0 mp_msg(MSGT_AVSYNC,MSGL_STATUS,"%d < %d < %d \r", (int)demuxer->movi_start, |