summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264_slice.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 725390e1a3..c7b2764270 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1306,6 +1306,7 @@ static int h264_export_frame_props(H264Context *h)
if (h->sei.picture_timing.timecode_cnt > 0) {
uint32_t *tc_sd;
+ char tcbuf[AV_TIMECODE_STR_SIZE];
AVFrameSideData *tcside = av_frame_new_side_data(out,
AV_FRAME_DATA_S12M_TIMECODE,
@@ -1324,6 +1325,8 @@ static int h264_export_frame_props(H264Context *h)
int ff = h->sei.picture_timing.timecode[i].frame;
tc_sd[i + 1] = av_timecode_get_smpte(h->avctx->framerate, drop, hh, mm, ss, ff);
+ av_timecode_make_smpte_tc_string(tcbuf, tc_sd[i + 1], 0);
+ av_dict_set(&out->metadata, "timecode", tcbuf, 0);
}
h->sei.picture_timing.timecode_cnt = 0;
}