[FFmpeg-devel] Patch: avformat_index_get_entry and avformat_index_get_entry_from_timestamp const correctness
Martijn Otto
martijn at resolume.com
Thu May 15 16:11:12 EEST 2025
On Thu, 2025-05-15 at 14:44 +0200, Andreas Rheinhardt wrote:
> Martijn Otto:
> > static av_always_inline const FFStream *cffstream(const AVStream
> > *st)
> > {
> > - return (FFStream*)st;
> > + return (const FFStream*)st;
> > }
>
> Your patch should be applied on top of git master, not some old
> version.
> The above change is identical to
> 185d0acdc7a67b7d3d78d4c917334c4c3bf9accd.
>
> Anyway, I remember that someone (IIRC Anton Khirnov) objected to the
> const when this was introduced.
>
> - Andreas
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
I've updated the patch to apply to latest master, I've made it quite
some time in the past, and something went wrong with my submission
then.
I'm curious to hear what the arguments against these functions taking a
const-qualified stream are, given that we return a const-value and
don't modify it at all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-avformat_index_get_entry-and-_from_timestamp-const-c.patch
Type: text/x-patch
Size: 2797 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250515/e6098c78/attachment.bin>
More information about the ffmpeg-devel
mailing list