[Mplayer-cvslog] CVS: main/libmpcodecs vf_zrmjpeg.c,1.2,1.3

Rik Snel CVS syncmail at mplayerhq.hu
Mon Feb 16 15:41:06 CET 2004


CVS change done by Rik Snel CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv15383

Modified Files:
	vf_zrmjpeg.c 
Log Message:
fixing segfault: libavcodec doesn't allocate some buffers if avctx->thread_count == 0

Index: vf_zrmjpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_zrmjpeg.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_zrmjpeg.c	6 Feb 2004 17:23:20 -0000	1.2
+++ vf_zrmjpeg.c	16 Feb 2004 14:41:04 -0000	1.3
@@ -360,6 +360,9 @@
 	/* alloc bogus avctx to keep MPV_common_init from segfaulting */
 	j->s->avctx = calloc(sizeof(*j->s->avctx), 1);
 
+	/* make MPV_common_init allocate important buffers, like s->block */
+	j->s->avctx->thread_count = 1;
+
 	if (MPV_common_init(j->s) < 0) {
 		free(j->s);
 		free(j);




More information about the MPlayer-cvslog mailing list