diff mbox series

[FFmpeg-devel,1/2] avcodec/setts_bsf: actually store the current packet's timestamps to be usable by the next

Message ID 20210703193103.706-1-jamrial@gmail.com
State Accepted
Commit b0b3fce3c33352a87267b6ffa51da31d5162daff
Headers show
Series [FFmpeg-devel,1/2] avcodec/setts_bsf: actually store the current packet's timestamps to be usable by the next
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

James Almer July 3, 2021, 7:31 p.m. UTC
Before this change, the PREV_OUTPTS and PREV_OUTDTS constants always evaluated
to AV_NOPTS_VALUE.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/setts_bsf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Paul B Mahol July 4, 2021, 1:16 p.m. UTC | #1
LGTM
diff mbox series

Patch

diff --git a/libavcodec/setts_bsf.c b/libavcodec/setts_bsf.c
index 2558e38f51..1e43036ee1 100644
--- a/libavcodec/setts_bsf.c
+++ b/libavcodec/setts_bsf.c
@@ -171,10 +171,10 @@  static int setts_filter(AVBSFContext *ctx, AVPacket *pkt)
         new_dts = new_ts;
     }
 
-    s->var_values[VAR_PREV_INPTS]  = pkt->pts;
-    s->var_values[VAR_PREV_INDTS]  = pkt->dts;
-    s->var_values[VAR_PREV_OUTPTS] = new_pts;
-    s->var_values[VAR_PREV_OUTDTS] = new_dts;
+    s->prev_inpts  = pkt->pts;
+    s->prev_indts  = pkt->dts;
+    s->prev_outpts = new_pts;
+    s->prev_outdts = new_dts;
 
     pkt->pts = new_pts;
     pkt->dts = new_dts;