Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/setts_bsf: set the output packet duration to 0
@ 2022-02-09 15:28 James Almer
  2022-02-13 17:07 ` James Almer
  0 siblings, 1 reply; 8+ messages in thread
From: James Almer @ 2022-02-09 15:28 UTC (permalink / raw)
  To: ffmpeg-devel

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@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;
 }
-- 
2.35.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-13 18:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 15:28 [FFmpeg-devel] [PATCH] avcodec/setts_bsf: set the output packet duration to 0 James Almer
2022-02-13 17:07 ` James Almer
2022-02-13 17:14   ` Paul B Mahol
2022-02-13 17:20     ` James Almer
2022-02-13 17:22       ` Andreas Rheinhardt
2022-02-13 17:28         ` James Almer
2022-02-13 17:32           ` Andreas Rheinhardt
2022-02-13 18:38           ` Gyan Doshi

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git