Skip to content

Commit

Permalink
avcodec: use av_timecode_make_smpte_tc_string2 in hevc and h264 decoder
Browse files Browse the repository at this point in the history
Signed-off-by: Marton Balint <[email protected]>
  • Loading branch information
cus committed Sep 13, 2020
1 parent babbb5a commit 5673802
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libavcodec/h264_slice.c
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ 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_timecode_make_smpte_tc_string2(tcbuf, h->avctx->framerate, tc_sd[i + 1], 0, 0);
av_dict_set(&out->metadata, "timecode", tcbuf, 0);
}
h->sei.picture_timing.timecode_cnt = 0;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/hevcdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2843,7 +2843,7 @@ static int set_side_data(HEVCContext *s)
int ff = s->sei.timecode.n_frames[i];

tc_sd[i + 1] = av_timecode_get_smpte(s->avctx->framerate, drop, hh, mm, ss, ff);
av_timecode_make_smpte_tc_string(tcbuf, tc_sd[i + 1], 0);
av_timecode_make_smpte_tc_string2(tcbuf, s->avctx->framerate, tc_sd[i + 1], 0, 0);
av_dict_set(&out->metadata, "timecode", tcbuf, 0);
}

Expand Down

0 comments on commit 5673802

Please sign in to comment.