[FFmpeg-cvslog] h264: color frames gray
Michael Niedermayer
git at videolan.org
Sat Feb 16 13:21:02 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Feb 16 12:13:48 2013 +0100| [1c5b8b916d3d068aef9b8d0842d9258eb6cb978d] | committer: Michael Niedermayer
h264: color frames gray
This prevents a regression from the removial of the buffer
initialization
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1c5b8b916d3d068aef9b8d0842d9258eb6cb978d
---
libavcodec/h264.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 3471e67..f171e07 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.
More information about the ffmpeg-cvslog
mailing list