[FFmpeg-devel] [PATCH] avcodec/setts_bsf: set the output packet duration to 0

James Almer jamrial at gmail.com
Sun Feb 13 19:07:27 EET 2022


On 2/9/2022 12:28 PM, James Almer wrote:
> It's not possible to know the resulting packet's duration after
> applying the expression as it depends on the timestamp of the next
> packet, which we haven't seen yet.
> The old duration, if any, is no longer valid, so just remove it.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>   libavcodec/setts_bsf.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/setts_bsf.c b/libavcodec/setts_bsf.c
> index d604f91f71..56307fc8cd 100644
> --- a/libavcodec/setts_bsf.c
> +++ b/libavcodec/setts_bsf.c
> @@ -180,6 +180,7 @@ static int setts_filter(AVBSFContext *ctx, AVPacket *pkt)
>   
>       pkt->pts = new_pts;
>       pkt->dts = new_dts;
> +    pkt->duration = 0;
>   
>       return ret;
>   }

Will apply.


More information about the ffmpeg-devel mailing list