haiku/src/add-ons
Adrien Destugues da455572ed AVCodecDecoder: fix timing problems
A combination of two problems made things go wrong with the timestamp of
decoded audio.

1) The output buffer size is too small to hold the complete input.
swresample handles this by buffering the input for use the next time it
is called, however repeatedly doing this results in lots of buffering,
and our way to compute the output timestamp from the input does not take
it into account so it does weird things. Moreover, we would need to
empty the buffer by calling swr_convert with NULL input in that case.

Fix: make sure to not feed more data to swr_convert than it can output
in our buffer. This way, no buffering occurs, only the matrixing
conversion.

2) When using planar audio, the "frame size" is a bit different. Instead
of adding sample size * channel count to 1 pointer, we need to add
sample size * 1 to each channel buffer.

Fix: add the "fInputFrameSize" which takes this into account, instead of
misusing fOutputFrameSize for the input.

Fixes #12460.
2016-02-14 11:45:13 +01:00
..
accelerants VIA gfx driver: fixed overlay on DDR166 and DDR200 memory. v0.19, updated docs. 2016-02-07 22:46:49 +01:00
bluetooth
decorators
disk_systems Build: Add architecture rule for libshared.a. 2016-01-15 21:12:24 -05:00
index_server index_server: Fix obvious memory leak in CLuceneDataBase 2016-01-08 16:26:44 -06:00
input_server Build: Add architecture rule for libshared.a. 2016-01-15 21:12:24 -05:00
kernel VIA gfx driver: fixed overlay on DDR166 and DDR200 memory. v0.19, updated docs. 2016-02-07 22:46:49 +01:00
locale
mail_daemon IMAP: Fixed stream vs. parse exception handling. 2016-02-10 13:55:56 +01:00
media AVCodecDecoder: fix timing problems 2016-02-14 11:45:13 +01:00
network_settings Build: Add architecture rule for libshared.a. 2016-01-15 21:12:24 -05:00
print Build: Add architecture rule for libshared.a. 2016-01-15 21:12:24 -05:00
screen_savers apps: Convert to using Set*UIColor. 2016-01-04 07:33:09 -05:00
tracker
translators preferences: Convert to using Set*UIColor. 2016-01-04 07:21:14 -05:00
Jamfile