summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-06-28 12:13:05 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-06-30 15:34:38 +0200
commit271ce76d317c5432e151216cf23f12b77ed6cb7e (patch)
tree6ab18a33d1ac6d090aa187c942e26834491aff95 /libavcodec/h264.c
parent0bfab80a0d9fce0180e8aa2a947267f89b725091 (diff)
h264: Parse registered data SEI message and AFD value
Partially based on code by Marton Balint and Kieran Kunhya. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 6fd238d444..6925a8ac31 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -822,6 +822,16 @@ static void decode_postinit(H264Context *h, int setup_finished)
h->sei_hflip, h->sei_vflip);
}
+ if (h->sei_reguserdata_afd_present) {
+ AVFrameSideData *sd = av_frame_new_side_data(cur->f, AV_FRAME_DATA_AFD,
+ sizeof(uint8_t));
+ if (!sd)
+ return;
+
+ *sd->data = h->active_format_description;
+ h->sei_reguserdata_afd_present = 0;
+ }
+
// FIXME do something with unavailable reference frames
/* Sort B-frames into display order */