1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-04 06:08:26 +02:00
FFmpeg/libavcodec
Marth64 0b342a2f15 avcodec/mpeg12dec: extract only one type of CC substream
In MPEG-2 user data, there can be different types of Closed Captions
formats embedded (A53, SCTE-20, or DVD). The current behavior of the
CC extraction code in the MPEG-2 decoder is to not be aware of
multiple formats if multiple exist, therefore allowing one format
to overwrite the other during the extraction process since the CC
extraction shares one output buffer for the normalized bytes.

This causes sources that have two CC formats to produce flawed output.
There exist real-world samples which contain both A53 and SCTE-20 captions
in the same MPEG-2 stream, and that manifest this problem. Example of symptom:
THANK YOU (expected) --> THTHANANK K YOYOUU (actual)

The solution is to pick only the first CC substream observed with valid bytes,
and ignore the other types. Additionally, provide an option for users
to manually "force" a type in the event that this matters for a particular
source.

Signed-off-by: Marth64 <marth64@proxyid.net>
2024-03-19 15:52:05 +01:00
..
2024-03-15 12:51:15 +01:00
2024-03-13 20:46:10 -03:00
2024-02-27 00:11:21 +01:00
2024-02-27 00:11:21 +01:00
2024-03-13 21:56:59 +00:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-04 17:45:00 +01:00
2024-03-10 13:51:37 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-02-29 10:30:16 +01:00
2024-02-20 17:31:40 +11:00
2024-02-21 20:08:25 +02:00
2024-02-21 20:08:25 +02:00
2024-03-12 14:37:49 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-12 14:37:49 +01:00
2024-03-15 12:51:15 +01:00
2024-02-17 14:45:49 +02:00
2024-02-17 14:45:49 +02:00