diff options
author | Kieran Kunhya <kieran@kunhya.com> | 2015-06-26 21:55:06 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-26 23:11:17 +0200 |
commit | 22291c372fa703242e8429bed61700ba81258f19 (patch) | |
tree | de9ee9e07cde6b602d5515bb5c23a983f867cdd4 /libavcodec/h264.c | |
parent | b75c0a72ed3bb5fab0a0b66ede94f6de887db585 (diff) | |
download | ffmpeg-22291c372fa703242e8429bed61700ba81258f19.tar.gz |
avcodec: Add support for per-frame AFD output in h264
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 9be317c55f..1cbd4cbee8 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -608,6 +608,7 @@ static int h264_init_context(AVCodecContext *avctx, H264Context *h) h->frame_recovered = 0; h->prev_frame_num = -1; h->sei_fpa.frame_packing_arrangement_cancel_flag = -1; + h->has_afd = 0; h->next_outputed_poc = INT_MIN; for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++) @@ -869,6 +870,15 @@ static void decode_postinit(H264Context *h, int setup_finished) } } + if (h->has_afd) { + AVFrameSideData *sd = + av_frame_new_side_data(cur->f, AV_FRAME_DATA_AFD, 1); + if (sd) { + *sd->data = h->afd; + h->has_afd = 0; + } + } + cur->mmco_reset = h->mmco_reset; h->mmco_reset = 0; |