Skip to content

Commit

Permalink
fix crash by multi-sample descriptions (Close #1)
Browse files Browse the repository at this point in the history
Fix a NULL pointer access in PrintVideoInfo().
  • Loading branch information
k-takata committed Nov 18, 2012
1 parent 8df4104 commit 177894e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/mp4v2/src/mp4info.cpp
Expand Up @@ -315,7 +315,8 @@ static char* PrintVideoInfo(

media_data_name = MP4GetTrackMediaDataName(mp4File, trackId);
// encv 264b
if (strcasecmp(media_data_name, "encv") == 0) {
if ((media_data_name != NULL) &&
(strcasecmp(media_data_name, "encv") == 0)) {
if (MP4GetTrackMediaDataOriginalFormat(mp4File,
trackId,
originalFormat,
Expand Down

0 comments on commit 177894e

Please sign in to comment.