]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/roqvideo.c
Set gray (128) U/V planes for chroma-less samples. Fixes two fate samples
[ffmpeg] / libavcodec / roqvideo.c
index d97c4361ce47578574f9a9b3537e80496d8d7594..eb8fc253ad074543a0a37eab6a3c4b25c7d2d5f0 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file libavcodec/roqvideo.c
+ * @file
  * id RoQ Video common functions based on work by Dr. Tim Ferguson
  */
 
@@ -115,6 +115,11 @@ static inline void apply_motion_generic(RoqContext *ri, int x, int y, int deltax
         return;
     }
 
+    if (ri->last_frame->data[0] == NULL) {
+        av_log(ri->avctx, AV_LOG_ERROR, "Invalid decode type. Invalid header?\n");
+        return;
+    }
+
     for(cp = 0; cp < 3; cp++) {
         int outstride = ri->current_frame->linesize[cp];
         int instride  = ri->last_frame   ->linesize[cp];