mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avfilter/framepool: update frame dimensions on reinit
The previous logic (ported from libavfilter/video.c) would leave the frame pool intact if the linesize did not change as a result of changing the frame dimensions. However, this caused ff_default_get_video_buffer2() to return frames with the old width/height. I think this bug was avoided in practice because the only filters to actually support changing the resolution at runtime already always explicitly overrode the width/height of allocated output buffers by the link properties. Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
@@ -305,6 +305,8 @@ int ff_frame_pool_video_reinit(FFFramePool **pool,
|
||||
cur->align == align)
|
||||
{
|
||||
av_assert1(cur->type == AVMEDIA_TYPE_VIDEO);
|
||||
cur->width = width;
|
||||
cur->height = height;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user