mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2025-03-03 18:30:23 +00:00
ffmpeg: pass the hwaccel frames context to the decoder
This commit is contained in:
parent
e84eeca577
commit
bfbf86ef18
7
ffmpeg.c
7
ffmpeg.c
@ -2547,6 +2547,13 @@ static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ist->hw_frames_ctx) {
|
||||
s->hw_frames_ctx = av_buffer_ref(ist->hw_frames_ctx);
|
||||
if (!s->hw_frames_ctx)
|
||||
return AV_PIX_FMT_NONE;
|
||||
}
|
||||
|
||||
ist->active_hwaccel_id = hwaccel->id;
|
||||
ist->hwaccel_pix_fmt = *p;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user