From: Zhao Zhili <zhiliz...@tencent.com>

---
Fix commit subject ffmpeg_opt -> ffmpeg_demux

 fftools/ffmpeg_demux.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 76778d774d..d2a6d39703 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -625,6 +625,10 @@ static void add_input_streams(const OptionsContext *o, 
AVFormatContext *ic)
                     "with old commandlines. This behaviour is DEPRECATED and 
will be removed "
                     "in the future. Please explicitly set 
\"-hwaccel_output_format qsv\".\n");
                 ist->hwaccel_output_format = AV_PIX_FMT_QSV;
+            } else if (!hwaccel_output_format && hwaccel && !strcmp(hwaccel, 
"mediacodec")) {
+                // There is no real AVHWFrameContext implementation. Set
+                // hwaccel_output_format to avoid av_hwframe_transfer_data 
error.
+                ist->hwaccel_output_format = AV_PIX_FMT_MEDIACODEC;
             } else if (hwaccel_output_format) {
                 ist->hwaccel_output_format = 
av_get_pix_fmt(hwaccel_output_format);
                 if (ist->hwaccel_output_format == AV_PIX_FMT_NONE) {
-- 
2.25.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to