[FFmpeg-devel] [PATCH] matroskadec: Improve TTA duration calculation
Paul B Mahol
onemda at gmail.com
Sat Aug 17 11:48:12 CEST 2013
On 8/16/13, James Almer <jamrial at gmail.com> wrote:
> On 16/08/13 5:21 PM, Paul B Mahol wrote:
>> On 8/16/13, James Almer <jamrial at gmail.com> wrote:
>>> On 16/08/13 7:24 AM, Paul B Mahol wrote:
>>>> On 8/15/13, James Almer <jamrial at gmail.com> wrote:
>>>>> - avio_wl32(&b, matroska->ctx->duration *
>>>>> + avio_wl32(&b, av_rescale(matroska->ctx->duration,
>>>>> track->audio.out_samplerate, AV_TIME_BASE));
>>>> Isn't time base variable thing that can be changed by muxer?
>>>> Perhaps this could be used when muxing tta files to make sure
>>>> last packet can always decode.
>>> Our muxer already uses 1000000 (aka AV_TIME_BASE) as timescale for every
>> But this patch does not use time base as used in file, but hardcode it,
> It's using matroska->ctx->duration, which is calculated using the duration
> and the timescale of the stream as stored in the file (line 1546).
But could it use track duration which is set in track time base units?
> That line for that matter could use av_rescale() as well instead of
> a plain a*b/c, but that's unrelated.
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel