[FFmpeg-cvslog] av_frame_get_buffer: Do not fail when the channel layout is unknown
Michael Niedermayer
git at videolan.org
Sat Jul 13 21:13:56 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jul 13 20:58:18 2013 +0200| [0a06e6e49b9b50d74dee2506139076bfe3606834] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0a06e6e49b9b50d74dee2506139076bfe3606834
---
libavutil/frame.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 7584ae3..3141dec 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);
More information about the ffmpeg-cvslog
mailing list