Skip to content

Commit

Permalink
Fix image duration opening from playlist or timeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Sep 30, 2014
1 parent 03dd41d commit 94ae6c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/docks/playlistdock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ void PlaylistDock::on_actionOpen_triggered()
if (i) {
QString xml = MLT.saveXML("string", i->producer);
Mlt::Producer* p = new Mlt::Producer(MLT.profile(), "xml-string", xml.toUtf8().constData());
QString service = p->get("mlt_service");
if (service == "pixbuf" || service == "qimage")
p->set_in_and_out(i->frame_in, i->frame_out);
emit clipOpened(p, i->frame_in, i->frame_out);
delete i;
}
Expand Down Expand Up @@ -311,6 +314,9 @@ void PlaylistDock::on_tableView_doubleClicked(const QModelIndex &index)
} else {
QString xml = MLT.saveXML("string", i->producer);
Mlt::Producer* p = new Mlt::Producer(MLT.profile(), "xml-string", xml.toUtf8().constData());
QString service = p->get("mlt_service");
if (service == "pixbuf" || service == "qimage")
p->set_in_and_out(i->frame_in, i->frame_out);
emit clipOpened(p, i->frame_in, i->frame_out);
}
delete i;
Expand Down
3 changes: 3 additions & 0 deletions src/docks/timelinedock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ void TimelineDock::openClip(int trackIndex, int clipIndex)
if (info) {
QString xml = MLT.saveXML("string", info->producer);
Mlt::Producer* p = new Mlt::Producer(MLT.profile(), "xml-string", xml.toUtf8().constData());
QString service = p->get("mlt_service");
if (service == "pixbuf" || service == "qimage")
p->set_in_and_out(info->frame_in, info->frame_out);
emit clipOpened(p, info->frame_in, info->frame_out);
}
}
Expand Down

0 comments on commit 94ae6c8

Please sign in to comment.