diff options
Diffstat (limited to 'src/libffmpeg/libavcodec/svq1.c')
-rw-r--r-- | src/libffmpeg/libavcodec/svq1.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libffmpeg/libavcodec/svq1.c b/src/libffmpeg/libavcodec/svq1.c index 77035f1f9..5a9a290b8 100644 --- a/src/libffmpeg/libavcodec/svq1.c +++ b/src/libffmpeg/libavcodec/svq1.c @@ -1066,7 +1066,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, AVFrame *pict = data; /* initialize bit buffer */ - init_get_bits(&s->gb,buf,buf_size); + init_get_bits(&s->gb,buf,buf_size*8); /* decode frame header */ s->f_code = get_bits (&s->gb, 22); @@ -1093,6 +1093,10 @@ static int svq1_decode_frame(AVCodecContext *avctx, return result; } + //FIXME this avoids some confusion for "B frames" without 2 references + //this should be removed after libavcodec can handle more flaxible picture types & ordering + if(s->pict_type==B_TYPE && s->last_picture.data[0]==NULL) return buf_size; + if(avctx->hurry_up && s->pict_type==B_TYPE) return buf_size; if(MPV_frame_start(s, avctx) < 0) |