avformat/movenc: avoid using uninitialized display_matrix_size
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 20 Mar 2015 23:24:31 +0000 (00:24 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 20 Mar 2015 23:24:31 +0000 (00:24 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/movenc.c

index 7f684b8..a9e1a23 100644 (file)
@@ -2302,7 +2302,7 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov,
 
         display_matrix = (uint32_t*)av_stream_get_side_data(st, AV_PKT_DATA_DISPLAYMATRIX,
                                                             &display_matrix_size);
-        if (display_matrix_size < 9 * sizeof(*display_matrix))
+        if (display_matrix && display_matrix_size < 9 * sizeof(*display_matrix))
             display_matrix = NULL;
     }