[FFmpeg-devel] [PATCH 1/2] tools ffprobe: add closed caption output to stream info
vectronic
hello.vectronic at gmail.com
Fri Apr 24 20:28:05 EEST 2020
ensure closed caption info which is visible in default stream dump is also available in results when -show_streams is used
Signed-off-by: vectronic <hello.vectronic at gmail.com>
---
fftools/ffprobe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 840fcb71e2..f0916cbd70 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2550,6 +2550,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
}
#endif
print_int("has_b_frames", par->video_delay);
+ print_int("closed_captions", !!(dec_ctx->properties & FF_CODEC_PROPERTY_CLOSED_CAPTIONS));
sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL);
if (sar.num) {
print_q("sample_aspect_ratio", sar, ':');
@@ -2950,6 +2951,7 @@ static int open_input_file(InputFile *ifile, const char *filename,
ist->dec_ctx->pkt_timebase = stream->time_base;
ist->dec_ctx->framerate = stream->avg_frame_rate;
+ ist->dec_ctx->properties = stream->codec->properties;
#if FF_API_LAVF_AVCTX
ist->dec_ctx->coded_width = stream->codec->coded_width;
ist->dec_ctx->coded_height = stream->codec->coded_height;
--
2.24.2 (Apple Git-127)
More information about the ffmpeg-devel
mailing list