Mercurial > libavcodec.hg
comparison mpegvideo.c @ 1751:3f1125adbc84 libavcodec
avcodec_flush_buffers() fix
author | michael |
---|---|
date | Mon, 19 Jan 2004 14:41:34 +0000 |
parents | 7b11032507e2 |
children | bdf3927bf8c5 |
comparison
equal
deleted
inserted
replaced
1750:610617f1dbd0 | 1751:3f1125adbc84 |
---|---|
3582 } | 3582 } |
3583 | 3583 |
3584 void ff_mpeg_flush(AVCodecContext *avctx){ | 3584 void ff_mpeg_flush(AVCodecContext *avctx){ |
3585 int i; | 3585 int i; |
3586 MpegEncContext *s = avctx->priv_data; | 3586 MpegEncContext *s = avctx->priv_data; |
3587 | |
3588 if(s==NULL || s->picture==NULL) | |
3589 return; | |
3587 | 3590 |
3588 for(i=0; i<MAX_PICTURE_COUNT; i++){ | 3591 for(i=0; i<MAX_PICTURE_COUNT; i++){ |
3589 if(s->picture[i].data[0] && ( s->picture[i].type == FF_BUFFER_TYPE_INTERNAL | 3592 if(s->picture[i].data[0] && ( s->picture[i].type == FF_BUFFER_TYPE_INTERNAL |
3590 || s->picture[i].type == FF_BUFFER_TYPE_USER)) | 3593 || s->picture[i].type == FF_BUFFER_TYPE_USER)) |
3591 avctx->release_buffer(avctx, (AVFrame*)&s->picture[i]); | 3594 avctx->release_buffer(avctx, (AVFrame*)&s->picture[i]); |