On Wed, Mar 15, 2017 at 12:53:03PM -0700, Aman Gupta wrote: > From: Aman Gupta <[email protected]> > > includes a fate test, which requires > https://s3.amazonaws.com/tmm1/ccaptions/scte20.ts > to be uploaded as sub/scte20.ts
uploaded
> ---
> libavcodec/mpeg12dec.c | 39 +++++++++++++++++++++++++++++++++++++++
> tests/fate/subtitles.mak | 3 +++
> tests/ref/fate/sub-cc-scte20 | 15 +++++++++++++++
> 3 files changed, 57 insertions(+)
> create mode 100644 tests/ref/fate/sub-cc-scte20
>
> diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
> index e49167f..cea8963 100644
> --- a/libavcodec/mpeg12dec.c
> +++ b/libavcodec/mpeg12dec.c
> @@ -2260,6 +2260,45 @@ static int mpeg_decode_a53_cc(AVCodecContext *avctx,
> avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;
> }
> return 1;
> + } else if (buf_size >= 2 &&
> + p[0] == 0x03 && (p[1]&0x7f) == 0x01) {
> + /* extract SCTE-20 CC data */
> + GetBitContext gb;
> + int cc_count = 0;
> + int i;
> +
> + init_get_bits(&gb, p + 2, buf_size - 2);
> + cc_count = get_bits(&gb, 5);
> + if (cc_count > 0) {
remainig bits or buf_size should be checked to be large enough for
cc_count
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
