Commit 87840eeb authored by Ronald S. Bultje's avatar Ronald S. Bultje

avcodec: disallow reget_buffer() if pix_fmt changed.

parent 33cd32b3
...@@ -553,6 +553,8 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){ ...@@ -553,6 +553,8 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){
return s->get_buffer(s, pic); return s->get_buffer(s, pic);
} }
assert(s->pix_fmt == pic->pix_fmt);
/* If internal buffer type return the same buffer */ /* If internal buffer type return the same buffer */
if(pic->type == FF_BUFFER_TYPE_INTERNAL) { if(pic->type == FF_BUFFER_TYPE_INTERNAL) {
if(s->pkt) pic->pkt_pts= s->pkt->pts; if(s->pkt) pic->pkt_pts= s->pkt->pts;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment