[FFmpeg-devel] [PATCH] ffprobe: use the metadata API instead of deprecated AVStream.language
Anton Khirnov
anton
Wed Oct 13 08:03:35 CEST 2010
---
ffprobe.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ffprobe.c b/ffprobe.c
index ac908e1..0e12fc4 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -163,6 +163,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
char val_str[128];
AVMetadataTag *tag = NULL;
AVRational display_aspect_ratio;
+ AVMetadataTag *t;
printf("[STREAM]\n");
@@ -220,8 +221,8 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
printf("r_frame_rate=%d/%d\n", stream->r_frame_rate.num, stream->r_frame_rate.den);
printf("avg_frame_rate=%d/%d\n", stream->avg_frame_rate.num, stream->avg_frame_rate.den);
printf("time_base=%d/%d\n", stream->time_base.num, stream->time_base.den);
- if (stream->language[0])
- printf("language=%s\n", stream->language);
+ if ((t = av_metadata_get(stream->metadata, "language", NULL, 0)))
+ printf("language=%s\n", t->value);
printf("start_time=%s\n", time_value_string(val_str, sizeof(val_str), stream->start_time,
&stream->time_base));
printf("duration=%s\n", time_value_string(val_str, sizeof(val_str), stream->duration,
--
1.7.1
More information about the ffmpeg-devel
mailing list