movenc: fixes a questionable valgrind uninitialized value warning

display_matrix_size is only initialized when av_stream_get_side_data()
returns a side data pointer. The code is safe since the only effect this
has is setting the display_matrix pointer to NULL which it was already
anyway.
This commit is contained in:
Janne Grunau 2015-06-09 12:27:47 +02:00
parent b14086ca38
commit 529c05698e
1 changed files with 1 additions and 1 deletions

View File

@ -1518,7 +1518,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;
}