avformat/movenc: avoid using uninitialized display_matrix_size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/125/head
Michael Niedermayer 10 years ago
parent 276a8666d2
commit 3c5c6870a7
  1. 2
      libavformat/movenc.c

@ -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;
}

Loading…
Cancel
Save