[FFmpeg-cvslog] Fix mpeg4 padding bug detection with more than 128bit trash and slices.
Michael Niedermayer
git at videolan.org
Fri Jul 1 03:06:26 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jul 1 02:51:10 2011 +0200| [9251942ca728e7807a2a95306415b27b36a8b8e7] | committer: Michael Niedermayer
Fix mpeg4 padding bug detection with more than 128bit trash and slices.
Fixes ticket302
The second hunk is from anatoly
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9251942ca728e7807a2a95306415b27b36a8b8e7
---
libavcodec/h263dec.c | 2 +-
libavcodec/mpeg4videodec.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index f079557..7b42046 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -269,7 +269,7 @@ static int decode_slice(MpegEncContext *s){
if( s->codec_id==CODEC_ID_MPEG4
&& (s->workaround_bugs&FF_BUG_AUTODETECT)
&& get_bits_left(&s->gb) >=0
- && get_bits_left(&s->gb) < 48
+ && get_bits_left(&s->gb) < 137
// && !s->resync_marker
&& !s->data_partitioning){
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 6b7b4bf..7cc30c2 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -113,7 +113,7 @@ static inline int mpeg4_is_resync(MpegEncContext *s){
int bits_count= get_bits_count(&s->gb);
int v= show_bits(&s->gb, 16);
- if(s->workaround_bugs&FF_BUG_NO_PADDING){
+ if(s->workaround_bugs&FF_BUG_NO_PADDING && !s->resync_marker){
return 0;
}
More information about the ffmpeg-cvslog
mailing list