avcodec: disallow reget_buffer() if pix_fmt changed.

This commit is contained in:
Ronald S. Bultje 2012-02-17 14:48:57 -08:00
parent 33cd32b389
commit 87840eeb71
1 changed files with 2 additions and 0 deletions

View File

@ -553,6 +553,8 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){
return s->get_buffer(s, pic);
}
assert(s->pix_fmt == pic->pix_fmt);
/* If internal buffer type return the same buffer */
if(pic->type == FF_BUFFER_TYPE_INTERNAL) {
if(s->pkt) pic->pkt_pts= s->pkt->pts;