fixes a segfault which was introduced in this file by the new ratecontrol code

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7137 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rik 2002-08-29 11:41:11 +00:00
parent a7d15a362b
commit 8ddf569e86
1 changed files with 3 additions and 0 deletions

View File

@ -338,6 +338,9 @@ jpeg_enc_t *jpeg_enc_init(int w, int h, int y_psize, int y_rsize,
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);