[Ffmpeg-cvslog] r5936 - trunk/ffmpeg.c

lucabe subversion
Sat Aug 5 15:09:43 CEST 2006


Author: lucabe
Date: Sat Aug  5 15:09:42 2006
New Revision: 5936

Modified:
   trunk/ffmpeg.c

Log:
Avoid segfaulting if the swscale context cannot be allocated


Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Sat Aug  5 15:09:42 2006
@@ -1665,6 +1665,10 @@
                             codec->height - (frame_padtop + frame_padbottom),
                             codec->pix_fmt,
                             sws_flags, NULL, NULL, NULL);
+                    if (ost->img_resample_ctx == NULL) {
+                        fprintf(stderr, "Cannot get resampling context\n");
+                        exit(1);
+                    }
                     ost->resample_height = icodec->height - (frame_topBand + frame_bottomBand);
                 }
                 ost->encoding_needed = 1;




More information about the ffmpeg-cvslog mailing list