]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
transcoder: fix the NULL pointer dereference, fixes #4564
authorJaroslav Kysela <perex@perex.cz>
Thu, 31 Aug 2017 13:54:57 +0000 (15:54 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 31 Aug 2017 13:54:57 +0000 (15:54 +0200)
src/transcoding/transcode/transcoder.c

index 134c7b8704f46bcb8c7516709fd9f651b1df0890..618e6f6e6ba526516da28740474ae60e127274dd 100644 (file)
@@ -118,7 +118,8 @@ tvh_transcoder_start(TVHTranscoder *self, tvh_ss_t *ss_src)
             break;
         case AVMEDIA_TYPE_AUDIO:
             aprofile = (TVHAudioCodecProfile *)self->profiles[media_type];
-            if (lang_match(aprofile->language1, ssc, &audio_pindex[0], i) == 0 &&
+            if (avprofile &&
+                lang_match(aprofile->language1, ssc, &audio_pindex[0], i) == 0 &&
                 lang_match(aprofile->language2, ssc, &audio_pindex[1], i) == 0)
                 lang_match(aprofile->language3, ssc, &audio_pindex[2], i);
             break;