aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-04-24 01:24:06 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-04-24 01:24:06 +0000
commit1c2a8c7f14a5030367b7f7287667e380935cb706 (patch)
treec7a4ff2b27b65883fd47b7ce5dfae6be5aabb5a1 /libavcodec/utils.c
parenteeba58ccc7f06b9b36efcdb93855168f8cf87599 (diff)
downloadffmpeg-1c2a8c7f14a5030367b7f7287667e380935cb706.tar.gz
avcodec_flush_buffers()
Originally committed as revision 420 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7240f2096a..c15b5674ce 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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 @@ PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);
#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;