Skip to content

Commit 3a46811

Browse files
committed
upipe-av: add S12M timecode extraction from side-data
Based on a patch by Josh de Kock.
1 parent efc88a8 commit 3a46811

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/upipe-av/upipe_avcodec_decode.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,6 +1324,13 @@ static void upipe_avcdec_output_pic(struct upipe *upipe, struct upump **upump_p)
13241324
if (side_data)
13251325
uref_pic_set_cea_708(uref, side_data->data, side_data->size);
13261326

1327+
#ifdef AV_FRAME_DATA_S12M_TIMECODE
1328+
side_data = av_frame_get_side_data(frame, AV_FRAME_DATA_S12M_TIMECODE);
1329+
if (side_data && uref_attr_s12m_check(side_data->data, side_data->size)) {
1330+
uref_pic_set_s12m(uref, side_data->data, side_data->size);
1331+
}
1332+
#endif
1333+
13271334
/* various time-related attributes */
13281335
upipe_avcdec_set_time_attributes(upipe, uref);
13291336

0 commit comments

Comments
 (0)