- ci->sws_pix_fmt = pix_fmt;
- ci->sws_width = width;
- ci->sws_height = height;
- ci->toRGB_convert_ctx = sws_getContext(
- ci->sws_width, ci->sws_height,
- ci->sws_pix_fmt,
- ci->sws_width, ci->sws_height,
- PIX_FMT_RGB24,
- sws_flags, NULL, NULL, NULL);
- if (ci->toRGB_convert_ctx == NULL) {
- av_log(NULL, AV_LOG_ERROR,
- "Cannot initialize the toRGB conversion context\n");
- exit(1);
- }
+ av_log(NULL, AV_LOG_ERROR,
+ "Cannot initialize the toRGB conversion context\n");
+ return;