This will result in no video in the output file, but in such cases, this
might actually be desirable. Scaling to such small dimensions is often
used simply to re-encode audio.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7412
b64f7644-9d1e-0410-96f1-
a4d463321fa5
pv->pix_fmt = in->f.fmt;
}
+ if (pv->context == NULL)
+ {
+ hb_buffer_close(&out);
+ return NULL;
+ }
+
// Scale pic_crop into pic_render according to the
// context set up above
sws_scale(pv->context,
1 << 16 ); // saturation
if (sws_init_context(ctx, NULL, NULL) < 0) {
- fprintf(stderr, "Cannot initialize resampling context\n");
+ hb_error("Cannot initialize resampling context");
sws_freeContext(ctx);
ctx = NULL;
}