-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video Support in V1.0: part 1/3 : support matroskavideo #2370
Conversation
Since the video support was removed, @neheb has continued using clang-tidy to modernize the code to be compatible with C++17. I don't know which C++ version the video code currently supports but some small changes may be needed to comply. @neheb, do you have any thoughts on this? @mohamedchebbii, please can you add at least one (small) test file to demonstrate that the code in your PR works. I don't know if we have a valid file in the |
I'd run through clang-tidy, yes. On a quick glance, I see constructors not marked as delete and not marked public. I'm guessing this is copy/paste from somewhere. |
include/exiv2/matroskavideo.hpp
Outdated
/*! | ||
@brief Helper structure for the Matroska tags lookup table. | ||
*/ | ||
struct MatroskaTags { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A simple std::pair is good enough I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 65a01dc
include/exiv2/matroskavideo.hpp
Outdated
void aspectRatio(); | ||
|
||
private: | ||
//! @name NOT Implemented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not implemented functions should be public and marked = delete;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done here 65a01dc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm? I don't see = delete;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad, It's here : 49f6acd
Codecov Report
@@ Coverage Diff @@
## main #2370 +/- ##
==========================================
- Coverage 64.20% 63.43% -0.77%
==========================================
Files 119 121 +2
Lines 21082 21361 +279
Branches 10393 10513 +120
==========================================
+ Hits 13535 13550 +15
- Misses 5393 5651 +258
- Partials 2154 2160 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
…sts and some minor fix
…windows compilation issue and some format issues
Before this gets merged, I'd like to run the fuzzer on it for a few days. I'll wait until the rest of the code review is done, so please ping me when you think it's ready to merge. |
|
… compilation issue and some format issues
… clang-format-12 patch 2
Needs rebasing. |
I started the fuzzer and it found a couple of crashes within a few minutes. The crash files are here: crash.tar.gz Please could you read the README in the |
I notice that the only test in this PR is a very basic unit test. For a new source file like this, we need some proper test files in |
include/exiv2/matroskavideo.hpp
Outdated
@param buf Pointer to the memory area with the tag information. | ||
@param size Size of \em buf. | ||
*/ | ||
void contentManagement(const MatroskaTags* mt, const byte* buf, long size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use the long
type. We're trying to eliminate it from the codebase. We usually use size_t
for sizes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
understood, thank you very much @kevinbackhouse for your time.
I will analyse the crash report and run locally the fuzz test to fix them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replacing long by size_t done here f14bf95
…l?id=51707 Resize buf to avoid buffer overflow.
…l?id=51241 Fix bounds checking bug.
* Fix BmffImage::writeMetadata() error id/message * Add exceptions setting Exif/IPTC/XMP in BMFF * Add missing header for new functions
Easier to read with lambdas. Signed-off-by: Rosen Penev <[email protected]>
…l?id=51751 Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52053 Avoid null pointer deref and heap buffer overflow.
Video Support in V1.0: part 1/4 : support matroskavideo Video Support in V1.0: part 1/3 : support matroskavideo : upgrade code and clean up Video Support in V1.0: part 1/3 : support matroskavideo : clang-format Video Support in V1.0: part 1/3 : support matroskavideo : Add unit tests and some minor fix Video Support in V1.0: part 1/3 : support matroskavideo : try to fix windows compilation issue and some format issues Video Support in V1.0: part 1/3 : support matroskavideo : Fix windows compilation issue and some format issues Video Support in V1.0: part 1/3 : support matroskavideo : Format with clang-format-12 Video Support in V1.0: part 1/3 : support matroskavideo : Format with clang-format-12 patch 2
…g by size_t and fix rebase issue
done here f14bf95 |
Hello,
I want to retsore the support of video files, I begin with matroskavideo and I will add tiff and asf format during next days.
Here a sample test results:
Please let me know If I miss anything, I will be happy to add It.
Best Regards,