From d4a688d02918e12543c7eaa42a953d2fb8d9375e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Mon, 30 Jul 2007 21:19:36 +0000 Subject: [PATCH] =?UTF-8?q?fix=20cabac=20decoding=20with=20some=20Blue-Ray?= =?UTF-8?q?=20sources=20Patch=20by=20Andreas=20=C3=96man=20%andreas=20A=20?= =?UTF-8?q?olebyn=20P=20nu%=20Original=20thread:=20Date:=20Jul=207,=202007?= =?UTF-8?q?=201:23=20AM=20Subject:=20[FFmpeg-devel]=20Corrupted=20blocks?= =?UTF-8?q?=20and=20seeking=20issues=20in=20H264=20disc=20sources?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally committed as revision 9836 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h264.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index c51496ae5b..8f7f6293a1 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -6076,6 +6076,10 @@ decode_intra_mb: if( IS_DIRECT(h->sub_mb_type[0] | h->sub_mb_type[1] | h->sub_mb_type[2] | h->sub_mb_type[3]) ) { pred_direct_motion(h, &mb_type); + h->ref_cache[0][scan8[4]] = + h->ref_cache[1][scan8[4]] = + h->ref_cache[0][scan8[12]] = + h->ref_cache[1][scan8[12]] = PART_NOT_AVAILABLE; if( h->ref_count[0] > 1 || h->ref_count[1] > 1 ) { for( i = 0; i < 4; i++ ) if( IS_DIRECT(h->sub_mb_type[i]) ) @@ -6111,11 +6115,11 @@ decode_intra_mb: for(list=0; listlist_count; list++){ for(i=0; i<4; i++){ + h->ref_cache[list][ scan8[4*i] ]=h->ref_cache[list][ scan8[4*i]+1 ]; if(IS_DIRECT(h->sub_mb_type[i])){ fill_rectangle(h->mvd_cache[list][scan8[4*i]], 2, 2, 8, 0, 4); continue; } - h->ref_cache[list][ scan8[4*i] ]=h->ref_cache[list][ scan8[4*i]+1 ]; if(IS_DIR(h->sub_mb_type[i], 0, list) && !IS_DIRECT(h->sub_mb_type[i])){ const int sub_mb_type= h->sub_mb_type[i];