# HG changeset patch # User reimar # Date 1160673675 0 # Node ID 31d504bf45f4d17b1dd3ad191ea5b359594ea522 # Parent 4b4acfeaa610b3e7c160f6d9cef7e216e825ed8a Cosmetics diff -r 4b4acfeaa610 -r 31d504bf45f4 libmpdemux/demux_mkv.c --- a/libmpdemux/demux_mkv.c Thu Oct 12 17:19:43 2006 +0000 +++ b/libmpdemux/demux_mkv.c Thu Oct 12 17:21:15 2006 +0000 @@ -3936,9 +3936,8 @@ { mkv_demuxer_t *mkv_d = (mkv_demuxer_t *) demuxer->priv; mkv_track_t *track = demux_mkv_find_track_by_num (mkv_d, track_num, MATROSKA_TRACK_SUBTITLE); - if ((track->language != NULL) && - strcmp(track->language, "und")) - strlcpy(lang, track->language, maxlen); + if (track->language && strcmp(track->language, "und")) + strlcpy(lang, track->language, maxlen); } /** \brief Get the language code for an audio track. @@ -3957,8 +3956,7 @@ { mkv_demuxer_t *mkv_d = (mkv_demuxer_t *) demuxer->priv; mkv_track_t *track = demux_mkv_find_track_by_num (mkv_d, track_num, MATROSKA_TRACK_AUDIO); - if ((track->language != NULL) && - strcmp(track->language, "und")) + if (track->language && strcmp(track->language, "und")) strlcpy(lang, track->language, maxlen); }