[FFmpeg-devel] [PATCH] avcodec/hevc_ps: fix the problem of memcmp losing effectiveness

Hendrik Leppkes h.leppkes at gmail.com
Thu Mar 28 11:43:04 EET 2024


On Thu, Mar 28, 2024 at 10:12 AM <tong1.wu-at-intel.com at ffmpeg.org> wrote:
>
> From: Tong Wu <tong1.wu at intel.com>
>
> HEVCHdrParams* receives a pointer which points to a dynamically
> allocated memory block. It causes the memcmp always returning 1.
> Add a function to do the comparision. A condition is also added to
> avoid malloc(0).
>
> Signed-off-by: Tong Wu <tong1.wu at intel.com>

I've been looking into some playback glitches after
456c8ebe7c7dcd766d36cd0296815d89fd1166b5 and I can confirm that this
patch fixes those as well.

Using the fixed position of the *hdr member and its offset seems a bit
icky though, and _at least_ could use a comment so future changes keep
it last.

- Hendrik


More information about the ffmpeg-devel mailing list