diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-11-23 01:56:21 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-11-23 01:56:21 +0200 |
commit | 5995bc175aea0417ce7ff7285c1c8fc84ebb5704 (patch) | |
tree | 7fa0b90e03fc5b3a6447b79754b654bc279f5237 /libmpcodecs/vd_ffmpeg.c | |
parent | 4c552b2e420ba4cb6d888b12360c7bf63e7cd03a (diff) | |
parent | af2988cbcef1b057772d44b9f9752be3f15960b0 (diff) | |
download | mpv-5995bc175aea0417ce7ff7285c1c8fc84ebb5704.tar.bz2 mpv-5995bc175aea0417ce7ff7285c1c8fc84ebb5704.tar.xz |
Merge svn changes up to r29962
Diffstat (limited to 'libmpcodecs/vd_ffmpeg.c')
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index eb53c6e830..52e11623db 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -476,10 +476,8 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ int type= MP_IMGTYPE_IPB; int width= avctx->width; int height= avctx->height; - int align=15; + avcodec_align_dimensions(avctx, &width, &height); //printf("get_buffer %d %d %d\n", pic->reference, ctx->ip_count, ctx->b_count); - if(avctx->pix_fmt == PIX_FMT_YUV410P) - align=63; //yes seriously, its really needed (16x16 chroma blocks in SVQ1 -> 64x64) if (pic->buffer_hints) { mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Buffer hints: %u\n", pic->buffer_hints); @@ -535,8 +533,7 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ mp_msg(MSGT_DECVIDEO, MSGL_DBG2, type== MP_IMGTYPE_IPB ? "using IPB\n" : "using IP\n"); } - mpi= mpcodecs_get_image(sh, type, flags, - (width+align)&(~align), (height+align)&(~align)); + mpi= mpcodecs_get_image(sh, type, flags, width, height); if (!mpi) return -1; // ok, let's see what did we get: |