Skip to content

Commit c891b15

Browse files
matthewn4444jacek-marchwicki
authored andcommitted
Checks metadata pointer if null before trying to print it
1 parent a10f75c commit c891b15

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

library-jni/jni/player.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,9 +1792,11 @@ void player_print_video_informations(struct Player *player,
17921792
AVDictionary *metadaat = stream->metadata;
17931793
AVDictionaryEntry *tag = NULL;
17941794
LOGI(3, "-- metadata:")
1795-
while ((tag = av_dict_get(metadaat, "", tag, AV_DICT_IGNORE_SUFFIX))
1796-
!= NULL) {
1797-
LOGI(3, "--- %s = %s", tag->key, tag->value);
1795+
if (metadaat) {
1796+
while ((tag = av_dict_get(metadaat, "", tag, AV_DICT_IGNORE_SUFFIX))
1797+
!= NULL) {
1798+
LOGI(3, "--- %s = %s", tag->key, tag->value);
1799+
}
17981800
}
17991801
LOGI(3, "-- codec_name: %s", codec->codec_name);
18001802
char *codec_type = "other";

0 commit comments

Comments
 (0)