Mercurial > libavcodec.hg
diff utils.c @ 341:bf26081c373c libavcodec
avcodec_flush_buffers()
author | michaelni |
---|---|
date | Wed, 24 Apr 2002 01:24:06 +0000 |
parents | 8899c3b35b57 |
children | 1ee4ba4ca783 |
line wrap: on
line diff
--- a/utils.c Tue Apr 23 08:52:53 2002 +0000 +++ b/utils.c Wed Apr 24 01:24:06 2002 +0000 @@ -22,6 +22,7 @@ #include "common.h" #include "dsputil.h" #include "avcodec.h" +#include "mpegvideo.h" #ifdef HAVE_MALLOC_H #include <malloc.h> #else @@ -479,6 +480,14 @@ #undef PCM_CODEC } +/* this should be called after seeking and before trying to decode the next frame */ +void avcodec_flush_buffers(AVCodecContext *avctx) +{ + MpegEncContext *s = avctx->priv_data; + s->num_available_buffers=0; +} + + static int encode_init(AVCodecContext *s) { return 0;