Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-10 12:37:48 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-20 05:43:39 +0300
commit0afa8a6c859bbcaf38a347647d3945054d76be1f (patch)
treedeae0239c8926e4e17a190e379ef6570570bbcce
parent33ec70785f4a0ac3b2f93ef26cd1486e678c2d03 (diff)
avcodec/h264_slice: Use AVFrame diemensions for grayscale handling
The AVFrame values are closer to the AVFrame bitmap changed instead of the AVCodecContext values, so this should be more robust Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit aef0e0f009802f1a5e21eb6465498632071e4475) Conflicts: libavcodec/h264_slice.c
-rw-r--r--libavcodec/h264_slice.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index b3fdc992e6..c467da3683 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -242,11 +242,11 @@ static int alloc_picture(H264Context *h, H264Picture *pic)
av_pix_fmt_get_chroma_sub_sample(pic->f.format,
&h_chroma_shift, &v_chroma_shift);
- for(i=0; i<FF_CEIL_RSHIFT(h->avctx->height, v_chroma_shift); i++) {
+ for(i=0; i<FF_CEIL_RSHIFT(pic->f.height, v_chroma_shift); i++) {
memset(pic->f.data[1] + pic->f.linesize[1]*i,
- 0x80, FF_CEIL_RSHIFT(h->avctx->width, h_chroma_shift));
+ 0x80, FF_CEIL_RSHIFT(pic->f.width, h_chroma_shift));
memset(pic->f.data[2] + pic->f.linesize[2]*i,
- 0x80, FF_CEIL_RSHIFT(h->avctx->width, h_chroma_shift));
+ 0x80, FF_CEIL_RSHIFT(pic->f.width, h_chroma_shift));
}
}