|
Is anyone using the MPEG plugin for mp3 files?
We're noticing it lies in determining the duration, in samples, of a
file.
I went perusing through the plugin source and found:
result = (long)((float)mpeg3demuxer_total_bytes(audio-
>astream->demuxer) / audio->avg_framesize * audio->samples_per_frame);
It seems that using an average frame size to calculate the # of
samples is fraught with error, no?
Of course, this totally breaks all of code that plays from point A to
point B, tries to keep the video in sync on scrubbing, etc, as we're
using the audio samples to determine the duration of the file. There
does not seem to be another api in the plugin for returning the
duration.
Thanks!
Steve
|