Skip to content

Commit

Permalink
Merge branch 'master' into ffmpeg-4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
AkarinVS committed Apr 17, 2023
2 parents 328924e + d73d2dc commit 5bea7a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/lwlibav_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,10 @@ static uint32_t correct_current_frame_number
uint32_t goal
)
{
#define MATCH_DTS( j ) (info[j].dts == pkt->dts)
// It's possible that the first few encoded frames all have DTS AV_NOPTS_VALUE, so we really
// shouldn't stop when dts matches: at least we should fallback to checking POS if allowed.
// Also note that `j` might contain side-effects, must always evaluate it exactly once!
#define MATCH_DTS( j ) (info[j].dts == pkt->dts && (pkt->dts != AV_NOPTS_VALUE || ((vdhp->lw_seek_flags & SEEK_POS_CORRECTION) == 0)))
#define MATCH_POS( j ) ((vdhp->lw_seek_flags & SEEK_POS_CORRECTION) && info[j].file_offset == pkt->pos)
order_converter_t *oc = vdhp->order_converter;
video_frame_info_t *info = vdhp->frame_list;
Expand Down

0 comments on commit 5bea7a5

Please sign in to comment.