changeset 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 2c34499ef4af
children 9a44c38d388c
files libvo/jpeg_enc.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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);