Conversation
Casting AVFilterContext* to C long truncated the high 32 bits on LLP64 platforms (64-bit Windows), so distinct contexts could collide on the same _context_by_ptr key. Key on size_t instead, which is pointer-width everywhere. Also route object addresses through uintptr_t rather than signed long long in OpaqueContainer.add.
av_new_packet() and AVPacket.size take int, but size stays size_t for av_buffer_create(). FFmpeg caps packet sizes at int range, so make the narrowing explicit to suppress the warning on Windows.
- AudioFrame._init: explicit int cast on _buffer_size -> avcodec_fill_audio_frame (C4267) - CodecContext: explicit int casts on extradata_size and parser in_size (C4267) - avcodec.pxd: bit_rate, rc_max_rate, rc_min_rate are int64_t in FFmpeg, not int; widen bit_rate setter to match (C4244, also fixes >2^31 truncation) - avformat.pxd: AVChapter.id is int64_t, not int (C4244, fixes id truncation) - Container.set_chapters: explicit uint cast on nb_chapters = count (C4244)
- PyIOFile.pos is a file position; declare it int64_t instead of long so it doesn't truncate past 2GB on Win64 (C4244 on pos = / += offset) - pyio_read_gil: explicit int cast on the len(res) return (C4244)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Casting AVFilterContext* to C long truncated the high 32 bits on LLP64 platforms (64-bit Windows), so distinct contexts could collide on the same _context_by_ptr key. Key on size_t instead, which is pointer-width everywhere. Also route object addresses through uintptr_t rather than signed long long in OpaqueContainer.add.