diff mbox series

[FFmpeg-devel,04/11] examples/remuxing: Use av_packet_rescale_ts()

Message ID AM7PR03MB6660209B5B0DD59BFAAC53C08FCF9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 78426da3f41bd88cc8ba02971a3a5be389fbead7
Headers show
Series [FFmpeg-devel,01/11] avformat/mux: Sanitize packets without data and side-data | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 3, 2021, 11:18 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 doc/examples/remuxing.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/doc/examples/remuxing.c b/doc/examples/remuxing.c
index 9835cc4c00..b23431567c 100644
--- a/doc/examples/remuxing.c
+++ b/doc/examples/remuxing.c
@@ -156,9 +156,7 @@  int main(int argc, char **argv)
         log_packet(ifmt_ctx, &pkt, "in");
 
         /* copy packet */
-        pkt.pts = av_rescale_q_rnd(pkt.pts, in_stream->time_base, out_stream->time_base, AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX);
-        pkt.dts = av_rescale_q_rnd(pkt.dts, in_stream->time_base, out_stream->time_base, AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX);
-        pkt.duration = av_rescale_q(pkt.duration, in_stream->time_base, out_stream->time_base);
+        av_packet_rescale_ts(&pkt, in_stream->time_base, out_stream->time_base);
         pkt.pos = -1;
         log_packet(ofmt_ctx, &pkt, "out");