This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch release/5.1
in repository ffmpeg.
The following commit(s) were added to refs/heads/release/5.1 by this push:
new edd4d6d8e6 avcodec/get_buffer: use frame pixel format instead of
context
edd4d6d8e6 is described below
commit edd4d6d8e6d3e84682954e7449ba7355ee77ac39
Author: James Almer <[email protected]>
AuthorDate: Thu Jul 23 10:39:44 2026 -0300
Commit: ffmpeg-devel <[email protected]>
CommitDate: Thu Jul 23 14:12:58 2026 +0000
avcodec/get_buffer: use frame pixel format instead of context
The documentation for get_buffer2() states:
"This callback must use the frame values, not the codec context values, to
calculate the required buffer size."
Fixes wrong output on hbd LCEVC enhanced samples where the base stream is
8bit.
Signed-off-by: James Almer <[email protected]>
(cherry picked from commit e1c1b6c55835d13647636340d478d370aa48fb8d)
---
libavcodec/get_buffer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/get_buffer.c b/libavcodec/get_buffer.c
index 974a20d143..111086976f 100644
--- a/libavcodec/get_buffer.c
+++ b/libavcodec/get_buffer.c
@@ -128,7 +128,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
do {
// NOTE: do not align linesizes individually, this breaks e.g.
assumptions
// that linesize[0] == 2*linesize[1] in the MPEG-encoder for 4:2:2
- ret = av_image_fill_linesizes(linesize, avctx->pix_fmt, w);
+ ret = av_image_fill_linesizes(linesize, frame->format, w);
if (ret < 0)
goto fail;
// increase alignment of w for next try (rhs gives the lowest bit
set in w)
@@ -141,7 +141,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
for (i = 0; i < 4; i++)
linesize1[i] = linesize[i];
- ret = av_image_fill_plane_sizes(size, avctx->pix_fmt, h, linesize1);
+ ret = av_image_fill_plane_sizes(size, frame->format, h, linesize1);
if (ret < 0)
goto fail;
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]