diff options
author | corey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-18 09:26:39 +0000 |
---|---|---|
committer | corey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-18 09:26:39 +0000 |
commit | b4e5108496a53bdbb673a35aed6a9ca3114c031b (patch) | |
tree | 839a8f181b3ed2b7e8a8c6ba5db870ee5652b965 /libmpdemux/demux_avi.c | |
parent | 366151d7419c64ab24268134c07a4b712b61efa7 (diff) | |
download | mpv-b4e5108496a53bdbb673a35aed6a9ca3114c031b.tar.bz2 mpv-b4e5108496a53bdbb673a35aed6a9ca3114c031b.tar.xz |
dwStart support for mplayer.
* demux_avi sets stream_delay according to dwStart
* mplayer adjusts audio_delay according to stream_delay
3 related patches are pending, and I will apply them over the next few
days if all goes well.
As I mentioned on -dev-eng, the funny indentation is in preparation for
one of those pending patches.
See:
Date: Fri, 17 Feb 2006 00:53:28 -0800
To: mplayer-dev-eng@mplayerhq.hu
Subject: [PATCH] bframes, dwStart: individual patches
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17644 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_avi.c')
-rw-r--r-- | libmpdemux/demux_avi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libmpdemux/demux_avi.c b/libmpdemux/demux_avi.c index 21ab48dc6c..217ceb1649 100644 --- a/libmpdemux/demux_avi.c +++ b/libmpdemux/demux_avi.c @@ -612,6 +612,12 @@ static demuxer_t* demux_open_avi(demuxer_t* demuxer){ mp_msg(MSGT_DEMUX,MSGL_V,"AVI video size=%d (%u) audio size=%d\n",vsize,priv->numberofframes,asize); sh_video->i_bps=(float)vsize/(sh_video->frametime*priv->numberofframes); } + + if (sh_video) + sh_video->stream_delay = (float)sh_video->video.dwStart * sh_video->video.dwScale/sh_video->video.dwRate; + if (sh_audio) + sh_audio->stream_delay = (float)sh_audio->audio.dwStart * sh_audio->audio.dwScale/sh_audio->audio.dwRate; + return demuxer; } |