changeset 19619:a83e5b8d2e63

Patch from Karolina Lindqvist <karolina.lindqvist@kramnet.se> "There is a bug in the zoran -vo zr driver, that makes the output garbled always. It also probably affects the zrmjpeg filter. This patch takes care of the problem." Patch tested and OK. And 10l to me, because this bug probably has existed for a looong time.
author rik
date Fri, 01 Sep 2006 18:49:40 +0000
parents e9576ce3d426
children 9e2fd669a6bd
files libmpcodecs/vf_zrmjpeg.c libvo/jpeg_enc.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_zrmjpeg.c	Fri Sep 01 18:20:29 2006 +0000
+++ b/libmpcodecs/vf_zrmjpeg.c	Fri Sep 01 18:49:40 2006 +0000
@@ -359,6 +359,8 @@
 
 	/* alloc bogus avctx to keep MPV_common_init from segfaulting */
 	j->s->avctx = calloc(sizeof(*j->s->avctx), 1);
+	/* Set up to encode mjpeg */
+	j->s->avctx->codec_id = CODEC_ID_MJPEG;
 
 	/* make MPV_common_init allocate important buffers, like s->block */
 	j->s->avctx->thread_count = 1;
--- a/libvo/jpeg_enc.c	Fri Sep 01 18:20:29 2006 +0000
+++ b/libvo/jpeg_enc.c	Fri Sep 01 18:49:40 2006 +0000
@@ -351,6 +351,8 @@
 
 	/* alloc bogus avctx to keep MPV_common_init from segfaulting */
 	j->s->avctx = calloc(sizeof(*j->s->avctx), 1);
+	/* Set up to encode mjpeg */
+	j->s->avctx->codec_id = CODEC_ID_MJPEG;
 
 	/* make MPV_common_init allocate important buffers, like s->block */
 	j->s->avctx->thread_count = 1;