mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
av_frame_get_buffer: Do not fail when the channel layout is unknown
Fixes handling of cases with unknown layouts but known channel counts Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
289737c8be
commit
0a06e6e49b
@ -223,7 +223,7 @@ int av_frame_get_buffer(AVFrame *frame, int align)
|
||||
|
||||
if (frame->width > 0 && frame->height > 0)
|
||||
return get_video_buffer(frame, align);
|
||||
else if (frame->nb_samples > 0 && frame->channel_layout)
|
||||
else if (frame->nb_samples > 0 && (frame->channel_layout || frame->channels > 0))
|
||||
return get_audio_buffer(frame, align);
|
||||
|
||||
return AVERROR(EINVAL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user