!256 ffmpegbug fix

Merge pull request !256 from ziyugao/master
This commit is contained in:
openharmony_ci 2024-08-25 07:24:02 +00:00 committed by Gitee
commit 7a666f073f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 1 deletions

View File

@ -255,6 +255,9 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
if (s->codec_id == AV_CODEC_ID_SVQ1) {
w_align = 64;
h_align = 64;
} else if (s->codec_id == AV_CODEC_ID_SNOW) {
w_align = 16;
h_align = 16;
}
break;
case AV_PIX_FMT_RGB555:

View File

@ -191,7 +191,7 @@ static int avgblur_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input)
goto fail;
}
for (p = 0; p < FF_ARRAY_ELEMS(output->data); p++) {
for (p = 0; p < FF_MIN(FF_ARRAY_ELEMS(output->data), 4); p++) {
src = (cl_mem) input->data[p];
dst = (cl_mem) output->data[p];
inter = (cl_mem)intermediate->data[p];