diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index e57f7ef1304d5b65e5f3df8977aba5ec18ae4aca..2d79f66e35bd32f56f4a25f3f06caf3ea2a6dc67 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -553,7 +553,7 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){
         return s->get_buffer(s, pic);
     }
 
-    assert(s->pix_fmt == pic->pix_fmt);
+    assert(s->pix_fmt == pic->format);
 
     /* If internal buffer type return the same buffer */
     if(pic->type == FF_BUFFER_TYPE_INTERNAL) {