• Marth64's avatar
    avcodec/mpeg12dec: extract only one type of CC substream · 0b342a2f
    Marth64 authored
    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: 's avatarMarth64 <marth64@proxyid.net>
    0b342a2f
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...