[FFmpeg-devel] [PATCH 1/2] avcodec/parser: fix fetch_timestamp in a scenario with unaligned packets
Michael Niedermayer
michael at niedermayer.cc
Wed Feb 21 06:32:05 EET 2024
On Tue, Feb 20, 2024 at 05:33:01PM +0100, Nicolas Gaullier wrote:
> Fix fetch_timestamp when the frame start is in a previous packet.
>
> Signed-off-by: Nicolas Gaullier <nicolas.gaullier at cji.paris>
> ---
> libavcodec/parser.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
This change looses pts
--- /tmp/old 2024-02-21 05:21:13.201646780 +0100
+++ /tmp/new 2024-02-21 05:20:52.205417887 +0100
@@ -1,174 +1,172 @@
[mpegts read_frame_internal stream=2, pts=310332330, dts=310332330, size=49072, duration=0, flags=0
-[mpegts read_frame_internal stream=2, pts=310348800, dts=310348800, size=16516, duration=0, flags=0
-[mpegts read_frame_internal stream=2, pts=310356000, dts=310356000, size=16876, duration=0, flags=0
-[mpegts read_frame_internal stream=2, pts=310366800, dts=310366800, size=51652, duration=0, flags=0
-[mpegts read_frame_internal stream=2, pts=310363200, dts=NOPTS, size=15588, duration=0, flags=0
-[mpegts read_frame_internal stream=2, pts=310370400, dts=NOPTS, size=21476, duration=0, flags=0
-[mpegts read_frame_internal stream=2, pts=310402800, dts=NOPTS, size=276868, duration=3600, flags=1
-[mpegts read_frame_internal stream=2, pts=310388400, dts=NOPTS, size=85884, duration=3600, flags=0
-[mpegts read_frame_internal stream=2, pts=310381200, dts=NOPTS, size=45761, duration=3600, flags=0
+[mpegts read_frame_internal stream=2, pts=NOPTS, dts=NOPTS, size=16516, duration=0, flags=0
+[mpegts read_frame_internal stream=2, pts=310348800, dts=310348800, size=16876, duration=0, flags=0
+[mpegts read_frame_internal stream=2, pts=310356000, dts=310356000, size=51652, duration=0, flags=0
+[mpegts read_frame_internal stream=2, pts=310366800, dts=310366800, size=15588, duration=0, flags=0
+[mpegts read_frame_internal stream=2, pts=310363200, dts=NOPTS, size=21476, duration=0, flags=0
+[mpegts read_frame_internal stream=2, pts=310370400, dts=NOPTS, size=276868, duration=3600, flags=1
+[mpegts read_frame_internal stream=2, pts=NOPTS, dts=NOPTS, size=85884, duration=3600, flags=0
+[mpegts read_frame_internal stream=2, pts=310388400, dts=NOPTS, size=45761, duration=3600, flags=0
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
"You are 36 times more likely to die in a bathtub than at the hands of a
terrorist. Also, you are 2.5 times more likely to become a president and
2 times more likely to become an astronaut, than to die in a terrorist
attack." -- Thoughty2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240221/ec09382f/attachment.sig>
More information about the ffmpeg-devel
mailing list