Skip to content

Commit b62825a

Browse files
committed
ffprobe: Deprecate stream timecode field and add frame side data timecode field
Signed-off-by: Derek Buitenhuis <[email protected]>
1 parent 792a5ce commit b62825a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ffprobe.c

+6
Original file line numberDiff line numberDiff line change
@@ -1917,6 +1917,10 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
19171917
if (sd->type == AV_FRAME_DATA_DISPLAYMATRIX && sd->size >= 9*4) {
19181918
writer_print_integers(w, "displaymatrix", sd->data, 9, " %11d", 3, 4, 1);
19191919
print_int("rotation", av_display_rotation_get((int32_t *)sd->data));
1920+
} else if (sd->type == AV_FRAME_DATA_GOP_TIMECODE && sd->size >= 8) {
1921+
char tcbuf[AV_TIMECODE_STR_SIZE];
1922+
av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data));
1923+
print_str("timecode", tcbuf);
19201924
}
19211925
writer_print_section_footer(w);
19221926
}
@@ -2227,13 +2231,15 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
22272231
else
22282232
print_str_opt("chroma_location", av_chroma_location_name(dec_ctx->chroma_sample_location));
22292233

2234+
#if FF_API_PRIVATE_OPT
22302235
if (dec_ctx->timecode_frame_start >= 0) {
22312236
char tcbuf[AV_TIMECODE_STR_SIZE];
22322237
av_timecode_make_mpeg_tc_string(tcbuf, dec_ctx->timecode_frame_start);
22332238
print_str("timecode", tcbuf);
22342239
} else {
22352240
print_str_opt("timecode", "N/A");
22362241
}
2242+
#endif
22372243
print_int("refs", dec_ctx->refs);
22382244
break;
22392245

0 commit comments

Comments
 (0)