Commit d2576955 authored by Marton Balint's avatar Marton Balint

avutil/frame: fix av_frame_copy for unknown layouts

I wonder how unknown layouts ever worked without this?
Reviewed-by: 's avatarNicolas George <george@nsup.org>
Reviewed-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 06c143e5
...@@ -725,7 +725,7 @@ int av_frame_copy(AVFrame *dst, const AVFrame *src) ...@@ -725,7 +725,7 @@ int av_frame_copy(AVFrame *dst, const AVFrame *src)
if (dst->width > 0 && dst->height > 0) if (dst->width > 0 && dst->height > 0)
return frame_copy_video(dst, src); return frame_copy_video(dst, src);
else if (dst->nb_samples > 0 && dst->channel_layout) else if (dst->nb_samples > 0 && dst->channels > 0)
return frame_copy_audio(dst, src); return frame_copy_audio(dst, src);
return AVERROR(EINVAL); return AVERROR(EINVAL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment