[FFmpeg-devel] [PATCH] avformat/dashdec: add attribute lang for audio and subtitle streams

Anton Khirnov anton at khirnov.net
Tue Mar 31 12:51:05 EEST 2020


Quoting Steven Liu (2020-03-29 03:04:26)
> There should have lang in the metadata of streams which show to user
> 
> Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> ---
>  libavformat/dashdec.c | 49 +++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 45 insertions(+), 4 deletions(-)
> 
> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
> @@ -2121,6 +2154,10 @@ static int dash_read_header(AVFormatContext *s)
>                  av_dict_set_int(&rep->assoc_stream->metadata, "variant_bitrate", rep->bandwidth, 0);
>              if (rep->id[0])
>                  av_dict_set(&rep->assoc_stream->metadata, "id", rep->id, 0);
> +            if (rep->lang) {
> +                av_dict_set(&rep->assoc_stream->metadata, "lang", rep->lang, 0);

It should be 'language'. See 'Public Metadata API' in avformat.h

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list