[FFmpeg-devel] [PATCH 2/2] ffprobe: Fix incorrect display of closed_captions property
Soft Works
softworkz at hotmail.com
Sun Sep 19 00:29:20 EEST 2021
Repro Example:
ffprobe -show_entries stream=closed_captions:disposition=:side_data= "http://streams.videolan.org/streams/ts/CC/NewsStream-608-ac3.ts"
While the codec string includes "Closed Captions",
the stream data is showing: closed_captions=0
Signed-off-by: softworkz <softworkz at hotmail.com>
---
fftools/ffprobe.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 880f05a6c2..9425c1a2e3 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2678,10 +2678,11 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
print_int("width", par->width);
print_int("height", par->height);
if (dec_ctx) {
+ unsigned codec_properties = av_stream_get_codec_properties(ist->st);
print_int("coded_width", dec_ctx->coded_width);
print_int("coded_height", dec_ctx->coded_height);
- print_int("closed_captions", !!(dec_ctx->properties & FF_CODEC_PROPERTY_CLOSED_CAPTIONS));
- print_int("film_grain", !!(dec_ctx->properties & FF_CODEC_PROPERTY_FILM_GRAIN));
+ print_int("closed_captions", !!(codec_properties & FF_CODEC_PROPERTY_CLOSED_CAPTIONS));
+ print_int("film_grain", !!(codec_properties & FF_CODEC_PROPERTY_FILM_GRAIN));
}
print_int("has_b_frames", par->video_delay);
sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL);
--
2.30.2.windows.1
More information about the ffmpeg-devel
mailing list