]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/frame.c
Merge commit '0c1d66a07917602303f129f5a5651faeec2415d5'
[ffmpeg] / libavutil / frame.c
index 5607206a099d5f8f8cd863b99e302d00d0791405..d5c7c9f32f9402ec3d0739045a7f9b8b49c3fe12 100644 (file)
@@ -375,6 +375,9 @@ int av_frame_ref(AVFrame *dst, const AVFrame *src)
 {
     int i, ret = 0;
 
+    av_assert1(dst->width == 0 && dst->height == 0);
+    av_assert1(dst->channels == 0);
+
     dst->format         = src->format;
     dst->width          = src->width;
     dst->height         = src->height;
@@ -504,6 +507,9 @@ void av_frame_unref(AVFrame *frame)
 
 void av_frame_move_ref(AVFrame *dst, AVFrame *src)
 {
+    av_assert1(dst->width == 0 && dst->height == 0);
+    av_assert1(dst->channels == 0);
+
     *dst = *src;
     if (src->extended_data == src->data)
         dst->extended_data = dst->data;