[FFmpeg-cvslog] H264: fix slice end error detection
Michael Niedermayer
git at videolan.org
Sat Apr 2 18:04:02 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Apr 2 17:59:10 2011 +0200| [4ce776d63691afd39900b5be48e20c4c42ae8057] | committer: Michael Niedermayer
H264: fix slice end error detection
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ce776d63691afd39900b5be48e20c4c42ae8057
---
libavcodec/h264.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 92eb46b..d48aa3e 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3116,7 +3116,8 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
if(s->mb_y >= s->mb_height){
tprintf(s->avctx, "slice end %d %d\n", get_bits_count(&s->gb), s->gb.size_in_bits);
- if(get_bits_count(&s->gb) == s->gb.size_in_bits ) {
+ if( get_bits_count(&s->gb) == s->gb.size_in_bits
+ || get_bits_count(&s->gb) < s->gb.size_in_bits && s->avctx->error_recognition < FF_ER_AGGRESSIVE) {
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask);
return 0;
More information about the ffmpeg-cvslog
mailing list