diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-16 12:13:48 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-16 13:13:18 +0100 |
commit | 1c5b8b916d3d068aef9b8d0842d9258eb6cb978d (patch) | |
tree | 3ff04a6af0f7043a5ef848292a9f14ae88aec8bb /libavcodec/h264.c | |
parent | a53b144ec041ce6a7f7bd16115e41a8194b95ef7 (diff) | |
download | ffmpeg-1c5b8b916d3d068aef9b8d0842d9258eb6cb978d.tar.gz |
h264: color frames gray
This prevents a regression from the removial of the buffer
initialization
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 3471e678a2..f171e0733c 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1344,9 +1344,17 @@ int ff_h264_frame_start(H264Context *h) MpegEncContext *const s = &h->s; int i; const int pixel_shift = h->pixel_shift; + int c[4] = { + 1<<(h->sps.bit_depth_luma-1), + 1<<(h->sps.bit_depth_chroma-1), + 1<<(h->sps.bit_depth_chroma-1), + -1 + }; if (ff_MPV_frame_start(s, s->avctx) < 0) return -1; + if(!h->sync) + avpriv_color_frame(&h->s.current_picture_ptr->f, c); ff_er_frame_start(s); /* * ff_MPV_frame_start uses pict_type to derive key_frame. |