s->num_available_buffers=0;
switch(avctx->codec_id){ case CODEC_ID_MPEG1VIDEO: case CODEC_ID_H263: case CODEC_ID_RV10: case CODEC_ID_MJPEG: case CODEC_ID_MJPEGB: case CODEC_ID_MPEG4: case CODEC_ID_MSMPEG4V1: case CODEC_ID_MSMPEG4V2: case CODEC_ID_MSMPEG4V3: case CODEC_ID_WMV1: case CODEC_ID_WMV2: case CODEC_ID_H263P: case CODEC_ID_H263I: case CODEC_ID_SVQ1: for(i=0; i<MAX_PICTURE_COUNT; i++){ if(s->picture[i].data[0] && (   s->picture[i].type == FF_BUFFER_TYPE_INTERNAL || s->picture[i].type == FF_BUFFER_TYPE_USER)) avctx->release_buffer(avctx, (AVVideoFrame*)&s->picture[i]); } break; default:  break; }
void avcodec_flush_buffers(AVCodecContext *avctx){    MpegEncContext *s = avctx->priv_data;    s->num_available_buffers=0;}