[FFmpeg-devel] [PATCH] ffprobe: use the metadata API instead of deprecated AVStream.language
Stefano Sabatini
stefano.sabatini-lala
Wed Oct 13 10:46:00 CEST 2010
On date Wednesday 2010-10-13 08:03:35 +0200, Anton Khirnov encoded:
> ---
> 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);
Well maybe this is not required as I'm already using av_metadata_get()
for showing metadata, maybe we should not duplicate that information.
> 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,
Regards.
--
FFmpeg = Forgiving and Fascinating Majestic Portable Encoding/decoding Ghost
More information about the ffmpeg-devel
mailing list