[FFmpeg-devel] [PATCH v4 2/3] avformat/imf: fix packet pts, dts and muxing

Zane van Iperen zane at zanevaniperen.com
Fri Feb 18 05:38:46 EET 2022



On 17/2/22 02:54, pal at sandflow.com wrote:
>                   av_log(s,
>                          AV_LOG_DEBUG,
>                          "Switch resource on track %d: re-open context\n",
>                          track->index);
> -                if (open_track_resource_context(s, &(track->resources[i])) != 0)
> -                    return NULL;
> +
> +                ret = open_track_resource_context(s, &(track->resources[i]));

Nit: "track->resources + i" is easier to read imo

> +                if (ret != 0)
> +                    return ret;
>                   if (track->current_resource_index > 0)
>                       avformat_close_input(&track->resources[track->current_resource_index].ctx);
>                   track->current_resource_index = i;
>               }
>   
> -            return &(track->resources[track->current_resource_index]);
> +            *resource = &(track->resources[track->current_resource_index]);

Nit: track->resources + track->current_resource_index



The rest lgtm.

Will apply (with nits fixed) in a few days of no objections.



More information about the ffmpeg-devel mailing list