#define CHECK_VASTATUS(va_status, func) \
if (va_status != VA_STATUS_SUCCESS) { \
fprintf(stderr, "%s:%d (%s) failed with %d\n", __func__, __LINE__, func, va_status); \
- exit(1); \
+ abort(); \
}
#undef BUFFER_OFFSET
va_dpy = try_open_va(va_display, &h264_profile, &error);
if (va_dpy == nullptr) {
fprintf(stderr, "error: %s\n", error.c_str());
- exit(1);
+ abort();
}
if (!va_dpy->can_use_zerocopy) {
use_zerocopy = false;
/* check the interested configattrib */
if ((attrib[VAConfigAttribRTFormat].value & VA_RT_FORMAT_YUV420) == 0) {
printf("Not find desired YUV420 RT format\n");
- exit(1);
+ abort();
} else {
config_attrib[config_attrib_num].type = VAConfigAttribRTFormat;
config_attrib[config_attrib_num].value = VA_RT_FORMAT_YUV420;
if (attrib[VAConfigAttribRateControl].value != VA_ATTRIB_NOT_SUPPORTED) {
if (!(attrib[VAConfigAttribRateControl].value & VA_RC_CQP)) {
fprintf(stderr, "ERROR: VA-API encoder does not support CQP mode.\n");
- exit(1);
+ abort();
}
config_attrib[config_attrib_num].type = VAConfigAttribRateControl;
if (!make_current(context, this->surface)) {
printf("display=%p surface=%p context=%p curr=%p err=%d\n", eglGetCurrentDisplay(), this->surface, context, eglGetCurrentContext(),
eglGetError());
- exit(1);
+ abort();
}
encode_thread_func();
delete_context(context);
if (ret < 0) {
char tmp[AV_ERROR_MAX_STRING_SIZE];
fprintf(stderr, "%s: avio_open2() failed: %s\n", filename.c_str(), av_make_error_string(tmp, sizeof(tmp), ret));
- exit(1);
+ abort();
}
string video_extradata; // FIXME: See other comment about global headers.
fprintf(stderr, "to expose Quick Sync. Alternatively, you can use --record-x264-video\n");
fprintf(stderr, "to use software instead of hardware H.264 encoding, at the expense\n");
fprintf(stderr, "of increased CPU usage and possibly bit rate.\n");
- exit(1);
+ abort();
}