[FFmpeg-devel] [PATCH] ffprobe: use the metadata API instead of deprecated AVStream.language

Anton Khirnov anton
Wed Oct 13 14:48:17 CEST 2010


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.

-- 
Anton Khirnov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ffprobe-print-stream-language-only-once.patch
Type: text/x-diff
Size: 1132 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101013/e18cafb0/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101013/e18cafb0/attachment.pgp>



More information about the ffmpeg-devel mailing list