Skip to content

Commit

Permalink
videosource: Decode all packets, even if hidden, when the file is PAFF
Browse files Browse the repository at this point in the history
Otherwise, we don't have enough packets to decode a frame until every
2nd call to GetFrame, and duplicates are output.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
  • Loading branch information
dwbuiten committed Aug 18, 2021
1 parent bd80248 commit 5da8f49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/videosource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ FFMS_Frame *FFMS_VideoSource::GetFrame(int n) {

int64_t StartTime = AV_NOPTS_VALUE, FilePos = -1;
bool Hidden = (((unsigned) CurrentFrame < Frames.size()) && Frames[CurrentFrame].Hidden);
if (HasSeeked || !Hidden)
if (HasSeeked || !Hidden || PAFFAdjusted)
DecodeNextFrame(StartTime, FilePos);

if (!HasSeeked)
Expand Down

0 comments on commit 5da8f49

Please sign in to comment.