diff mbox series

[FFmpeg-devel,1/2] tools ffprobe: add closed caption output to stream info

Message ID 20200424172806.87267-2-hello.vectronic@gmail.com
State Withdrawn
Headers show
Series ffprobe add closed caption output to stream info | expand

Checks

Context Check Description
andriy/default pending
andriy/make_warn warning New warnings during build
andriy/make success Make finished
andriy/make_fate fail Make fate failed

Commit Message

vectronic April 24, 2020, 5:28 p.m. UTC
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@gmail.com>
---
 fftools/ffprobe.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Nicolas George April 24, 2020, 5:33 p.m. UTC | #1
vectronic (12020-04-24):
> 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@gmail.com>
> ---
>  fftools/ffprobe.c | 2 ++
>  1 file changed, 2 insertions(+)

I think you need to update doc/ffprobe.xsd if you add a field. And the
updates to the ref files belong in the same commit.

Regards,
diff mbox series

Patch

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;