Skip to content

Commit

Permalink
Revert "Remove pointless workaround"
Browse files Browse the repository at this point in the history
This reverts commit 0f70f78.
  • Loading branch information
myrsloik committed Mar 27, 2024
1 parent ed3e608 commit 2af47b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/videosource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ void LWVideoDecoder::OpenFile(const std::string &SourceFile, const std::string &
CodecContext->flags |= AV_CODEC_FLAG_DROPCHANGED;
}

// Full explanation by more clever person available here: https://github.com/Nevcairiel/LAVFilters/issues/113
if (CodecContext->codec_id == AV_CODEC_ID_H264 && CodecContext->has_b_frames) {
CodecContext->has_b_frames = 15; // the maximum possible value for h264
}

if (HWMode) {
CodecContext->extra_hw_frames = ExtraHWFrames;
CodecContext->pix_fmt = hw_pix_fmt;
Expand Down

0 comments on commit 2af47b9

Please sign in to comment.