Commit 5dc21287 authored by aurel's avatar aurel

compute pts according to the audio codec

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10803 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cc0e105d
......@@ -304,10 +304,17 @@ static int ea_read_packet(AVFormatContext *s,
pkt->pts *= ea->audio_frame_counter;
pkt->pts /= ea->sample_rate;
switch (ea->audio_codec) {
case CODEC_ID_ADPCM_EA:
/* 2 samples/byte, 1 or 2 samples per frame depending
* on stereo; chunk also has 12-byte header */
ea->audio_frame_counter += ((chunk_size - 12) * 2) /
ea->num_channels;
break;
default:
ea->audio_frame_counter += chunk_size /
(ea->bytes * ea->num_channels);
}
}
packet_read = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment