aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ref/acodec/mp2fixed
diff options
context:
space:
mode:
authorAnssi Hannula <anssi.hannula@iki.fi>2020-02-19 22:46:35 +0200
committerAnssi Hannula <anssi.hannula@iki.fi>2020-02-20 22:18:18 +0200
commit36e156bef02566d70cea46cc5e00b3e5d5ed3286 (patch)
treecbdd5c363eda0a0d2c71985d75ae059f639aa9a0 /tests/ref/acodec/mp2fixed
parent1d5338e450b18c5715271dee48761e2438d3bd77 (diff)
downloadffmpeg-36e156bef02566d70cea46cc5e00b3e5d5ed3286.tar.gz
avformat/spdifenc: fix handling of large TrueHD frames
The TrueHD IEC 61937 encapsulation code uses a very naive method of always inserting 24 TrueHD frames evenly in a MAT frame. This does not work for larger frames as they may exceed the size of 1/24th of a MAT frame. To fix that, use the input_timing field in the TrueHD frame to determine the proper position of the TrueHD frame in the MAT frame. That field is basically a dts field, telling the time to feed this frame to the decoder in sample count units. This can cause a TrueHD frame to be split between two MAT frames, so a second concatenation hd_buf is added, alternating with the first buffer. Large frames are preceded by smaller frames that have input_timing values that cause the frames to be sent out faster than the nominal rate (i.e. increasing decoder latency, long decoder buffer), allowing the larger frames to then be sent out slower than the nominal rate as the decoder has enough data buffered to keep it busy.
Diffstat (limited to 'tests/ref/acodec/mp2fixed')
0 files changed, 0 insertions, 0 deletions