[okular] [Bug 376574] Linked video in pdf doesn't work

Oliver Sander bugzilla_noreply at kde.org
Fri Feb 17 21:39:16 UTC 2017


https://bugs.kde.org/show_bug.cgi?id=376574

--- Comment #3 from Oliver Sander <oliver.sander at tu-dresden.de> ---
The problem is in the file videowidget.cpp, in the method
VideoWidget::Private::load().

There, starting in line 110 is says

    QString url = movie->url();

Here, url is the movie location, namely http:/vmiklos.hu/file/small.mp4

The code continues:

    QUrl newurl;
    if ( QDir::isRelativePath( url ) )
    {
        newurl = document->currentDocument().adjusted(QUrl::RemoveFilename);
        newurl.setPath( newurl.path() + url );
    }

and sure enough, QDir::isRelativePath takes the content of 'url' to be a
relative path, because it does not start with '/'.   Hence the 'if' branch is
taken, and the document path is prepended to the movie part. Seems like the
code was not written with internet movies in mind.

Strangely enough, the code continues:

    if ( newurl.isLocalFile() )
        player->load( newurl );
    else
        player->load( newurl );

Surely that's not right?  Martin, you introduced this in d8fdb1494 , can you
please have a look?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list