[FFmpeg-cvslog] swr: check that allocation of in/out_convert succeeded

Michael Niedermayer git at videolan.org
Thu Jan 10 20:33:22 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jan 10 20:26:28 2013 +0100| [a74548521b2348aea7dc3a69ce814dc7b0d6aca8] | committer: Michael Niedermayer

swr: check that allocation of in/out_convert succeeded

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a74548521b2348aea7dc3a69ce814dc7b0d6aca8
---

 libswresample/swresample.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 4c971dc..badba7b 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -369,6 +369,8 @@ av_assert0(s->out.ch_count);
     s->out_convert= swri_audio_convert_alloc(s->out_sample_fmt,
                                              s->int_sample_fmt, s->out.ch_count, NULL, 0);
 
+    if (!s->in_convert || !s->out_convert)
+        return AVERROR(ENOMEM);
 
     s->postin= s->in;
     s->preout= s->out;



More information about the ffmpeg-cvslog mailing list