Skip to content

Commit

Permalink
Clean up more fixme comments
Browse files Browse the repository at this point in the history
  • Loading branch information
myrsloik committed Nov 5, 2024
1 parent d7799b3 commit 4ff85ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/videosource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ bool BestVideoSource::NearestCommonFrameRate(BSRational &FPS) {
}

BestVideoSource::BestVideoSource(const std::filesystem::path &SourceFile, const std::string &HWDeviceName, int ExtraHWFrames, int Track, int VariableFormat, int Threads, int CacheMode, const std::filesystem::path &CachePath, const std::map<std::string, std::string> *LAVFOpts, const ProgressFunction &Progress)
: Source(SourceFile), HWDevice(HWDeviceName), ExtraHWFrames(!HWDeviceName.empty() ? ExtraHWFrames : 0), VideoTrack(Track), VariableFormat(VariableFormat), Threads(Threads), DefaultFormatSet(AV_PIX_FMT_NONE, 0, 0) { // fixme, default format default constructor
: Source(SourceFile), HWDevice(HWDeviceName), ExtraHWFrames(!HWDeviceName.empty() ? ExtraHWFrames : 0), VideoTrack(Track), VariableFormat(VariableFormat), Threads(Threads) {
// Only make file path absolute if it exists to pass through special protocol paths
std::error_code ec;
if (std::filesystem::exists(SourceFile, ec))
Expand Down Expand Up @@ -1402,7 +1402,7 @@ void BestVideoSource::InitializeFormatSets() {
for (const auto &Iter : TrackIndex.Frames) {
auto V = std::make_tuple(Iter.Format, Iter.Width, Iter.Height);
if (SeenSets.insert(std::make_pair(V, std::make_tuple(0, 0, 0, &Iter))).second)
FormatSets.push_back(FormatSet(Iter.Format, Iter.Width, Iter.Height));
FormatSets.push_back(FormatSet{ {}, Iter.Format, Iter.Width, Iter.Height });
std::get<0>(SeenSets[V])++;
std::get<1>(SeenSets[V]) += Iter.RepeatPict + 2;
}
Expand Down
10 changes: 3 additions & 7 deletions src/videosource.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,16 @@ class BestVideoSource {
public:
struct FormatSet {
BSVideoFormat VF = {};
int Format;
int Width;
int Height;
int Format = 0;
int Width = 0;
int Height = 0;

double StartTime = 0;

int64_t NumFrames = 0;
int64_t NumRFFFrames = 0;

bool TFF = false;

FormatSet(int Format, int Width, int Height) : Format(Format), Width(Width), Height(Height) { // fixme, move constructor

}
};

struct FrameInfo {
Expand Down

0 comments on commit 4ff85ae

Please sign in to comment.