]> git.sesse.net Git - kdenlive/commitdiff
Fix crash in audio align when hitting subtitle stream:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 2 Sep 2012 20:13:35 +0000 (22:13 +0200)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 2 Sep 2012 20:13:35 +0000 (22:13 +0200)
http://kdenlive.org/mantis/view.php?id=2697

src/lib/audio/audioInfo.cpp

index c210ef7eaece5d29ca6fa2b28cd9d721767df4f9..56e230957fcc63eebaa556037eb19f9c7508f915 100644 (file)
@@ -25,8 +25,8 @@ m_producer(NULL)
     int streams = atoi(producer->get("meta.media.nb_streams"));
     for (int i = 0; i < streams; i++) {
         QByteArray propertyName = QString("meta.media.%1.stream.type").arg(i).toLocal8Bit();
-
-        if (strcmp("audio", producer->get(propertyName.data())) == 0) {
+       const char* streamtype = producer->get(propertyName.data());
+        if (streamtype && strcmp("audio", streamtype) == 0) {
             m_list << new AudioStreamInfo(producer, i);
         }