ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Sat Mar 21 23:45:46 2015 +0100| [141b9d5c3b4d3dd4e9034ea73ed73f25cc0340e7] | committer: Michael Niedermayer
avcodec/h264_slice: update slice context linesizes when a new picture is allocated previously they where only updated when decoding started and would thus have been inconsistent for a longer period of time leaving more chances for problems Signed-off-by: Michael Niedermayer <michae...@gmx.at> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=141b9d5c3b4d3dd4e9034ea73ed73f25cc0340e7 --- libavcodec/h264_slice.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index fe773a5..44000c7 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -711,6 +711,11 @@ static int h264_frame_start(H264Context *h) if ((ret = ff_h264_ref_picture(h, &h->cur_pic, h->cur_pic_ptr)) < 0) return ret; + for (i = 0; i < h->nb_slice_ctx; i++) { + h->slice_ctx[i].linesize = h->cur_pic_ptr->f.linesize[0]; + h->slice_ctx[i].uvlinesize = h->cur_pic_ptr->f.linesize[1]; + } + if (CONFIG_ERROR_RESILIENCE) { ff_er_frame_start(&h->slice_ctx[0].er); ff_h264_set_erpic(&h->slice_ctx[0].er.last_pic, NULL); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog