diff options
author | Kieran Kunhya <kierank@ob-encoder.com> | 2015-07-06 01:05:01 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-07-06 15:25:22 +0200 |
commit | 8234f0e3b485811d60c228c40a94a141c46e61ca (patch) | |
tree | 8df09c2e5d949619c0a01f3cba329701971077eb /libavcodec/h264.c | |
parent | 38402754b97745125b25d38bf525fe46cace9370 (diff) | |
download | ffmpeg-8234f0e3b485811d60c228c40a94a141c46e61ca.tar.gz |
avcodec: Add support for Closed Caption export in h264
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index baedcf4243..f62ad6a2f3 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -879,6 +879,15 @@ static void decode_postinit(H264Context *h, int setup_finished) } } + if (h->a53_caption) { + AVFrameSideData *sd = + av_frame_new_side_data(cur->f, AV_FRAME_DATA_A53_CC, h->a53_caption_size); + if (sd) + memcpy(sd->data, h->a53_caption, h->a53_caption_size); + av_freep(&h->a53_caption); + h->a53_caption_size = 0; + } + cur->mmco_reset = h->mmco_reset; h->mmco_reset = 0; |