diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-13 20:58:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-13 21:09:20 +0200 |
commit | 0a06e6e49b9b50d74dee2506139076bfe3606834 (patch) | |
tree | e0158199bacb9fbd1c9b83198760bea374660717 /libavutil | |
parent | 289737c8be2898edc2455b2f15816cf5a0777dc4 (diff) | |
download | ffmpeg-0a06e6e49b9b50d74dee2506139076bfe3606834.tar.gz |
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>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/frame.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c index 7584ae3587..3141dec72e 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -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); |