[FFmpeg-devel] [PATCH 1/3] Take avcodec_align_dimensions2 into account in ffplay's get_buffer

David Conrad lessen42
Mon May 24 03:02:47 CEST 2010


---
 ffplay.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 2e2149e..db84fa3 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1592,7 +1592,7 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
         unsigned vshift = i == 0 ? 0 : av_pix_fmt_descriptors[ref->pic->format].log2_chroma_h;
 
         if (ref->data[i]) {
-            ref->data[i]    += (edge >> hshift) + ((edge * ref->linesize[i]) >> vshift);
+            ref->data[i] += FFALIGN((edge >> hshift) + ((edge * ref->linesize[i]) >> vshift), stride[i]);
         }
         pic->data[i]     = ref->data[i];
         pic->linesize[i] = ref->linesize[i];
-- 
1.7.0.2




More information about the ffmpeg-devel mailing list