fd = avpriv_tempfile("xvidrc.", &tmp_name, 0, s->avctx);
if (fd < 0) {
- av_log(NULL, AV_LOG_ERROR, "Can't create temporary pass2 file.\n");
+ av_log(s, AV_LOG_ERROR, "Can't create temporary pass2 file.\n");
return fd;
}
if (write(fd, tmp, strlen(tmp)) < 0) {
int ret = AVERROR(errno);
- av_log(NULL, AV_LOG_ERROR, "Error %s writing 2pass logfile\n", av_err2str(ret));
+ av_log(s, AV_LOG_ERROR, "Error %s writing 2pass logfile\n", av_err2str(ret));
av_free(tmp_name);
close(fd);
return ret;
if (xvid_plugin_2pass2(NULL, XVID_PLG_CREATE, &xvid_plg_create,
&s->rc_context.non_lavc_opaque) < 0) {
- av_log(NULL, AV_LOG_ERROR, "xvid_plugin_2pass2 failed\n");
+ av_log(s, AV_LOG_ERROR, "xvid_plugin_2pass2 failed\n");
return -1;
}
return 0;
xvid_plg_data.type = s->last_pict_type;
if (xvid_plugin_2pass2(s->rc_context.non_lavc_opaque,
XVID_PLG_AFTER, &xvid_plg_data, NULL)) {
- av_log(s->avctx, AV_LOG_ERROR,
+ av_log(s, AV_LOG_ERROR,
"xvid_plugin_2pass2(handle, XVID_PLG_AFTER, ...) FAILED\n");
return -1;
}
xvid_plg_data.quant = 0;
if (xvid_plugin_2pass2(s->rc_context.non_lavc_opaque,
XVID_PLG_BEFORE, &xvid_plg_data, NULL)) {
- av_log(s->avctx, AV_LOG_ERROR,
+ av_log(s, AV_LOG_ERROR,
"xvid_plugin_2pass2(handle, XVID_PLG_BEFORE, ...) FAILED\n");
return -1;
}