[MPlayer-dev-eng] sound being fastforwarded 3 times as fast as the fastforwarding of the video
Joris Beugnies
joris.beugnies at pandora.be
Tue Nov 6 00:32:08 CET 2001
Hi,
Last week I reported (user-mailing-list)about some strange problem with my sound being
fastforwarded 3 times as fast as the fastforwarding of the video.
I uploaded the files but I didn't want just to sit around and wait :-)
So I took a look at the code and I found the problem in libmpdemux/demux_avi.c
When the audio_chunk is searched for, apparently max_chunk is reached and
it falls trough without hitting hitting the correct chunk, so
calculating the wrong offset ...
The init of chunk_max raises my question :
int
chunk_max=(demuxer->type==DEMUXER_TYPE_AVI)?video_chunk_pos:priv->idx_size;
I get the avi properly working by changing the == into !=
Since I really don't know a thing about this kind of stuff I thought I'd better ask :-)
Joris
P.S. 1)the files are uploaded and called shrek.txt/shrek.avi
2) the playing of the file is done with the -nobps option
(using -bps gives the behaviour that a huge A-V correction is done, which works,
but also fails after fast forwarding)
Playing /mnt/cdrom/shrek.avi
File size is 730337280 bytes
Detected AVI file format!
======= AVI Header =======
us/frame: 41708 (fps=23.976)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames total: 125611 initial: 0
streams: 2
Suggested BufferSize: 0
Size: 512 x 384
==> Found video stream: 0
======= STREAM Header =======
Type: vids FCC: div3 (33766964)
Flags: 0
Priority: 0 Language: 0
InitialFrames: 0
Rate: 23976/1000 = 23.976
Start: 0 Len: 125611
Suggested BufferSize: 70986
Quality 10000
Sample size: 0
found 'bih', 40 bytes of 40
======= VIDEO Format ======
biSize 40
biWidth 512
biHeight 384
biPlanes 1
biBitCount 24
biCompression 861292868='DIV3'
biSizeImage 589824
===========================
Regenerating keyframe table for DIVX 3 video
==> Found audio stream: 1
======= STREAM Header =======
Type: auds FCC: (0)
Flags: 0
Priority: 0 Language: 0
InitialFrames: 1
Rate: 48000/1152 = 41.667
Start: 0 Len: 72759
Suggested BufferSize: 6912
Quality -1
Sample size: 1152
found 'wf', 30 bytes of 20
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 48000
avg byte/sec: 15999
Block align: 1152
bits/sample: 0
cbSize: 12
Found movie at 0x280C - 0x2B579A50
Reading INDEX block, 198365 chunks for 125611 frames
AVI index offset: 10248
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video length=725491493
VIDEO: [DIV3] 512x384 24bpp 23.98 fps 1107.8 kbps (135.2 kbyte/s)
[V] filefmt:3 fourcc:0x33564944 size:512x384 fps:23.98 ftime:=0.0417
Detected audio codec: [mp3] drv:1 (MPEG layer-2, layer-3)
Initializing audio codec...
------------------------------------------------------------------------
More information about the MPlayer-dev-eng
mailing list