diff options
author | Janne Grunau <janne-libav@jannau.net> | 2015-06-09 12:27:47 +0200 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2015-06-10 14:32:11 +0200 |
commit | 529c05698e88b057f0bea61e0d85f2b42925b5ea (patch) | |
tree | 6bd1d3c7027c24122b0a3bf4af157e07920c93e9 | |
parent | b14086ca38efa1a86cb0f0c6aa147b05f698877b (diff) | |
download | ffmpeg-529c05698e88b057f0bea61e0d85f2b42925b5ea.tar.gz |
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.
-rw-r--r-- | libavformat/movenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 30d397a349..761c3e8323 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -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; } |