# HG changeset patch # User rik # Date 1157136580 0 # Node ID a83e5b8d2e637896f5f2304859368d5a8563673e # Parent e9576ce3d4262976797f699723a5698407fe3285 Patch from Karolina Lindqvist "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. diff -r e9576ce3d426 -r a83e5b8d2e63 libmpcodecs/vf_zrmjpeg.c --- 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; diff -r e9576ce3d426 -r a83e5b8d2e63 libvo/jpeg_enc.c --- 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;