[FFmpeg-devel] [PATCH] ffprobe: use the metadata API instead of deprecated AVStream.language
Stefano Sabatini
stefano.sabatini-lala
Thu Oct 14 14:18:20 CEST 2010
On date Wednesday 2010-10-13 14:48:17 +0200, Anton Khirnov encoded:
> On Wed, Oct 13, 2010 at 10:46:00AM +0200, Stefano Sabatini wrote:
> > 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.
> >
> ok, changed.
Fine with me.
--
FFmpeg = Fabulous Fundamentalist Mean Patchable Earthshaking Gem
More information about the ffmpeg-devel
mailing list