1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

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;