aboutsummaryrefslogtreecommitdiffstats
path: root/tests/audiomatch.c
diff options
context:
space:
mode:
authorZhao Zhili <zhilizhao@tencent.com>2023-01-11 23:33:12 +0800
committerZhao Zhili <zhilizhao@tencent.com>2023-01-26 23:31:37 +0800
commit1263b0a6ca8f51cebbd21568af31b37235650515 (patch)
tree809bd2bb465974237248429a3528329a6a036f81 /tests/audiomatch.c
parent2c3107c3e9c9a8885fc0860ac471dae2f1054586 (diff)
downloadffmpeg-1263b0a6ca8f51cebbd21568af31b37235650515.tar.gz
avutil/hwcontext_mediacodec: fix backward compatibility
AVMediaCodecDeviceContext without surface or native_window is useless, it shouldn't be created at all. Such dummy AVHWDeviceContext is allowed before, and it's used by mpv player. Creating a ANativeWindow automatically breaks such usecases. So disable creating a ANativeWindow by default. It can be enabled via the create_window flag, or by set the AVDictionary of av_hwdevice_ctx_create(). The downside is that ffmpeg -hwaccel mediacodec -i input.mp4 \ -c:a copy -c:v hevc_mediacodec output.mp4 use ByteBuffer mode which isn't as efficient as before. The upside is libavfilter works now, which should be less surprise. To enable create_window on ffmpeg command line, use ffmpeg -hwaccel mediacodec \ -init_hw_device mediacodec=mediacodec,create_window=1 \ -i input.mp4 -c:a copy -c:v hevc_mediacodec output.mp4 Users should know what it is to enable create_window. It should be OK to take sometime to figure out the option. And there are comments inside hwcontext_mediacodec.h to help user figure it out. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Diffstat (limited to 'tests/audiomatch.c')
0 files changed, 0 insertions, 0 deletions