# HG changeset patch # User alex # Date 1016575938 0 # Node ID d337cc4ab0eedcf0e363e6d46dc0b8f0ba26721b # Parent 2ca5a9bfaa98a205d51f1977da1826e0f34da625 config vo if resolution changed (after decoded image read the dimensions out of lavc context) diff -r 2ca5a9bfaa98 -r d337cc4ab0ee libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Tue Mar 19 21:48:55 2002 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Tue Mar 19 22:12:18 2002 +0000 @@ -98,10 +98,17 @@ if(ret<0) mp_msg(MSGT_DECVIDEO,MSGL_WARN, "Error while decoding frame!\n"); if(!got_picture) return NULL; // skipped image + if ((ctx->width != sh->disp_w) || + (ctx->height != sh->disp_h)) + { + if (mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12)) + return NULL; + } + mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE, ctx->width, ctx->height); if(!mpi){ // temporary! - printf("couldn't allocate image for cinepak codec\n"); + printf("couldn't allocate image for codec\n"); return NULL; }