[FFmpeg-cvslog] Fix ticket127
Michael Niedermayer
git at videolan.org
Sun May 22 23:04:28 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May 22 19:06:10 2011 +0200| [a0cd98b5943a7807aff837f9adba1dd034ec2272] | committer: Michael Niedermayer
Fix ticket127
This fixes detectiion of slightly too big dummy frames.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a0cd98b5943a7807aff837f9adba1dd034ec2272
---
libavcodec/h263dec.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index b56fd06..bf6a856 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -681,22 +681,18 @@ retry:
frame_end:
/* divx 5.01+ bistream reorder stuff */
if(s->codec_id==CODEC_ID_MPEG4 && s->divx_packed){
- int current_pos= get_bits_count(&s->gb)>>3;
+ int current_pos= s->gb.buffer == s->bitstream_buffer ? 0 : (get_bits_count(&s->gb)>>3);
int startcode_found=0;
if(buf_size - current_pos > 5){
int i;
- for(i=current_pos; i<buf_size-3; i++){
+ for(i=current_pos; i<buf_size-4; i++){
if(buf[i]==0 && buf[i+1]==0 && buf[i+2]==1 && buf[i+3]==0xB6){
- startcode_found=1;
+ startcode_found=!(buf[i+4]&0x40);
break;
}
}
}
- if(s->gb.buffer == s->bitstream_buffer && buf_size>7 && s->xvid_build>=0){ //xvid style
- startcode_found=1;
- current_pos=0;
- }
if(startcode_found){
av_fast_malloc(
More information about the ffmpeg-cvslog
mailing list