aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/opusdec.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-10-27 16:45:12 +0200
committerNiklas Haas <git@haasn.dev>2023-11-09 12:53:35 +0100
commitcedf589c09c567b72bf4c1a58db53d94622567e1 (patch)
tree6f9233a1223531939623e4e7a0a71c6860e40a1a /libavcodec/opusdec.c
parentacf63d5350adeae551d412db699f8ca03f7e76b9 (diff)
downloadffmpeg-cedf589c09c567b72bf4c1a58db53d94622567e1.tar.gz
swscale: fix sws_setColorspaceDetails after sws_init_context
More commonly, this fixes the case of sws_setColorspaceDetails after sws_getContext, since the latter implies sws_init_context. The problem here is that sws_init_context sets up the range conversion and fast path tables based on the values of srcRange/dstRange at init time. This may result in locking in a "wrong" path (either using unscaled fast path when range conversion later required, or using scaled slow path when range conversion becomes no longer required). There are two way outs: 1. Always initialize range conversion and unscaled converters, even if they will be unused, and extend the runtime check. 2. Re-do initialization if the values change after sws_setColorspaceDetails. I opted for approach 1 because it was simpler and easier to reason about. Reword the av_log message to make it clear that this special converter is not necessarily used, depending on whether or not there is range conversion or YUV matrix conversion going on.
Diffstat (limited to 'libavcodec/opusdec.c')
0 files changed, 0 insertions, 0 deletions