Skip to content

Commit

Permalink
Fix #196 drop external file on playlist of empty project.
Browse files Browse the repository at this point in the history
The single or first item should be opened in player automatically when
dropped with an empty project. Because it did not, the user could drag
directly from playlist to timeline, which would cause a crash.
  • Loading branch information
ddennedy committed Feb 16, 2016
1 parent 06a5e97 commit fd92dfd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/docks/playlistdock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ void PlaylistDock::onDropped(const QMimeData *data, int row)
QString path = MAIN.removeFileScheme(url);
Mlt::Producer p(MLT.profile(), path.toUtf8().constData());
if (p.is_valid()) {
if (!MLT.producer())
MAIN.open(path);
// Convert avformat to avformat-novalidate so that XML loads faster.
if (!qstrcmp(p.get("mlt_service"), "avformat")) {
p.set("mlt_service", "avformat-novalidate");
Expand Down

0 comments on commit fd92dfd

Please sign in to comment.