Commit 5084ed88 authored by lucabe's avatar lucabe

Avoid segfaulting if the swscale context cannot be allocated


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5936 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6b80f22a
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment