[FFmpeg-devel] [PATCH v2] dashdec: Support signaling of last segment number (Adding space to avoid mixing styles)

Steven Liu lq at chinaffmpeg.org
Thu Mar 22 14:06:31 EET 2018



> On 22 Mar 2018, at 19:15, sanilraut <raut.sanil at gmail.com> wrote:
> 
> ---
> libavformat/dashdec.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
> index bf61837..db63a99 100644
> --- a/libavformat/dashdec.c
> +++ b/libavformat/dashdec.c
> @@ -922,8 +922,8 @@ static int parse_manifest_representation(AVFormatContext *s, const char *url,
>                 rep->first_seq_no = (int64_t) strtoll(startnumber_val, NULL, 10);
>                 xmlFree(startnumber_val);
>             }
> -            if(adaptionset_supplementalproperty_node){
> -                if(strcmp(xmlGetProp(adaptionset_supplementalproperty_node,"schemeIdUri"), "http://dashif.org/guidelines/last-segment-number") == 0){
> +            if (adaptionset_supplementalproperty_node) {
> +                if (!strcmp(xmlGetProp(adaptionset_supplementalproperty_node,"schemeIdUri"), "http://dashif.org/guidelines/last-segment-number")) {
What about use av_strcasecmp?
>                     val = xmlGetProp(adaptionset_supplementalproperty_node,"value");
>                     rep->last_seq_no =(int64_t) strtoll(val, NULL, 10) - 1;
>                     xmlFree(val);
> @@ -1833,7 +1833,7 @@ static int open_demux_for_component(AVFormatContext *s, struct representation *p
>     pls->parent = s;
>     pls->cur_seq_no  = calc_cur_seg_no(s, pls);
> 
> -    if(pls->last_seq_no == 0){
> +    if (!pls->last_seq_no) {
>         pls->last_seq_no = calc_max_seg_no(pls, s->priv_data);
>     }
> 
> -- 
> 2.7.4
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Thanks
Steven







More information about the ffmpeg-devel mailing list