[FFmpeg-devel] [PATCH] libavformat/dashenc.c:add mimetype

James Almer jamrial at gmail.com
Fri May 29 15:45:54 EEST 2020


On 5/29/2020 4:18 AM, Siyuan Huang wrote:
> according iso 23009-1 , mimetype is mandatory attibutes, must contain it
> 
>  
> 
> Signed-off-by: SiyuanHuang <saber.huang at samsung.com>
> 
> ---
> 
> libavformat/dashenc.c | 4 ++--
> 
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
>  
> 
> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> 
> index 6f8de5762b..f71c1364b4 100755
> 
> --- a/libavformat/dashenc.c
> 
> +++ b/libavformat/dashenc.c
> 
> @@ -807,8 +807,8 @@ static int write_adaptation_set(AVFormatContext *s,
> AVIOContext *out, int as_ind
> 
>      AVDictionaryEntry *lang, *role;
> 
>      int i;
> 
> -    avio_printf(out, "\t\t<AdaptationSet id=\"%d\" contentType=\"%s\"
> startWithSAP=\"1\" segmentAlignment=\"true\" bitstreamSwitching=\"true\"",
> 
> -                as->id, as->media_type == AVMEDIA_TYPE_VIDEO ? "video" :
> "audio");
> 
> +    avio_printf(out, "\t\t<AdaptationSet id=\"%d\" contentType=\"%s\"
> mimeType=\"%s/mp4\" startWithSAP=\"1\" segmentAlignment=\"true\"
> bitstreamSwitching=\"true\"",
> 
> +                as->id, as->media_type == AVMEDIA_TYPE_VIDEO ? "video" :
> "audio",as->media_type == AVMEDIA_TYPE_VIDEO ? "video" : "audio");

No, mimetype is already being applied in a per-Representation basis.

> 
>      if (as->media_type == AVMEDIA_TYPE_VIDEO && as->max_frame_rate.num &&
> !as->ambiguous_frame_rate && av_cmp_q(as->min_frame_rate,
> as->max_frame_rate) < 0)
> 
>          avio_printf(out, " maxFrameRate=\"%d/%d\"", as->max_frame_rate.num,
> as->max_frame_rate.den);
> 
>      else if (as->media_type == AVMEDIA_TYPE_VIDEO && as->max_frame_rate.num
> && !as->ambiguous_frame_rate && !av_cmp_q(as->min_frame_rate,
> as->max_frame_rate))
> 



More information about the ffmpeg-devel mailing list