[FFmpeg-devel] [crop support for matroska demuxer, V4 2/3] libavcodec: Public code to support container crop
Michael Niedermayer
michael at niedermayer.cc
Fri Nov 25 01:07:46 EET 2022
On Wed, Nov 23, 2022 at 03:44:25PM +0100, Dmitrii Ovchinnikov wrote:
> >>The types seems mismatching
>
> The reason for the mismatch of types is that I left the
> int type according to the comments :
> "
> James Almer
> IMO the AVFrame ones should have not been size_t to begin with, not just
> because the actual dimensions you'll apply them to are int, but because
> these fields are not arch dependent or meant for the size of some object
> in memory.
> "
>
> It seems that performing casts would not be a good idea.
> Should I make crop fields size_t type as in AVFrame?
> Or is there a more correct way?
the type specified in the format string has to match the types passed
in the argument to av_log
"%"SIZE_SPECIFIER" + size_t
or
%d + int
otherwise you have undefined behavior
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20221125/0df7ab38/attachment.sig>
More information about the ffmpeg-devel
mailing list