diff options
author | Luca Abeni <lucabe72@email.it> | 2006-08-05 13:09:42 +0000 |
---|---|---|
committer | Luca Abeni <lucabe72@email.it> | 2006-08-05 13:09:42 +0000 |
commit | 0b50ac8a0f412ec4a933669163e19fc03c8a0e48 (patch) | |
tree | 4d6b11193e6099dac5a9576d5f21f3d751c1e0dc /ffmpeg.c | |
parent | e7268d51aff739691a47071671ac0565a1050ed8 (diff) | |
download | ffmpeg-0b50ac8a0f412ec4a933669163e19fc03c8a0e48.tar.gz |
Avoid segfaulting if the swscale context cannot be allocated
Originally committed as revision 5936 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1665,6 +1665,10 @@ static int av_encode(AVFormatContext **output_files, 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; |