diff libvo/jpeg_enc.c @ 7136:122efc309784

fixes a segfault which was introduced in this file by the new ratecontrol code
author rik
date Thu, 29 Aug 2002 11:41:11 +0000
parents feeaffcce1fa
children 48b3a6f15540
line wrap: on
line diff
--- a/libvo/jpeg_enc.c	Thu Aug 29 07:07:12 2002 +0000
+++ b/libvo/jpeg_enc.c	Thu Aug 29 11:41:11 2002 +0000
@@ -338,6 +338,9 @@
 		return NULL;
 	}
 
+	/* alloc bogus avctx to keep MPV_common_init from segfaulting */
+	j->s->avctx = calloc(sizeof(*j->s->avctx), 1);
+
 	if (MPV_common_init(j->s) < 0) {
 		free(j->s);
 		free(j);