[FFmpeg-cvslog] r10803 - trunk/libavformat/electronicarts.c
aurel
subversion
Fri Oct 19 01:40:03 CEST 2007
Author: aurel
Date: Fri Oct 19 01:40:03 2007
New Revision: 10803
Log:
compute pts according to the audio codec
Modified:
trunk/libavformat/electronicarts.c
Modified: trunk/libavformat/electronicarts.c
==============================================================================
--- trunk/libavformat/electronicarts.c (original)
+++ trunk/libavformat/electronicarts.c Fri Oct 19 01:40:03 2007
@@ -304,10 +304,17 @@ static int ea_read_packet(AVFormatContex
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;
More information about the ffmpeg-cvslog
mailing list