From ea6d70780349eb30a882035c6069f71c54f7b55f Mon Sep 17 00:00:00 2001
From: "Gregorio Gervasio, Jr" <gregorio.gervasio@gmail.com>
Date: Sat, 1 Oct 2016 22:47:43 -0700
Subject: [PATCH 1/2] Changed to copy A53 captions before field check.
---
mythtv/external/FFmpeg/libavcodec/h264.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/mythtv/external/FFmpeg/libavcodec/h264.c b/mythtv/external/FFmpeg/libavcodec/h264.c
index fe8d44e..629aead 100644
a
|
b
|
static void decode_postinit(H264Context *h, int setup_finished) |
748 | 748 | if (h->next_output_pic) |
749 | 749 | return; |
750 | 750 | |
| 751 | if (h->a53_caption) { |
| 752 | AVFrameSideData *sd = av_frame_new_side_data(cur->f, |
| 753 | AV_FRAME_DATA_A53_CC, |
| 754 | h->a53_caption_size); |
| 755 | if (sd) |
| 756 | memcpy(sd->data, h->a53_caption, h->a53_caption_size); |
| 757 | av_freep(&h->a53_caption); |
| 758 | h->a53_caption_size = 0; |
| 759 | h->avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; |
| 760 | } |
| 761 | |
751 | 762 | if (cur->field_poc[0] == INT_MAX || cur->field_poc[1] == INT_MAX) { |
752 | 763 | /* FIXME: if we have two PAFF fields in one packet, we can't start |
753 | 764 | * the next thread here. If we have one field per packet, we can. |
… |
… |
static void decode_postinit(H264Context *h, int setup_finished) |
892 | 903 | } |
893 | 904 | } |
894 | 905 | |
895 | | if (h->a53_caption) { |
896 | | AVFrameSideData *sd = av_frame_new_side_data(cur->f, |
897 | | AV_FRAME_DATA_A53_CC, |
898 | | h->a53_caption_size); |
899 | | if (sd) |
900 | | memcpy(sd->data, h->a53_caption, h->a53_caption_size); |
901 | | av_freep(&h->a53_caption); |
902 | | h->a53_caption_size = 0; |
903 | | h->avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; |
904 | | } |
905 | | |
906 | 906 | cur->mmco_reset = h->mmco_reset; |
907 | 907 | h->mmco_reset = 0; |
908 | 908 | |