Bug 303227

Summary: Movie in pdf is not played if movie file path contains ./
Product: [Applications] okular Reporter: Oliver Sander <oliver.sander>
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 0.14.95   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: pdf containing the movie that won't play
Corresponding tex sources
Example movie file
Patch to use KTemporaryFile

Description Oliver Sander 2012-07-09 09:13:10 UTC
I have a pdf file created with LaTeX + beamer.  It contains a movie file embedded using the movie15 package.  When I click on the rectangle where the movie should appear, the black viewer window appears, but the movie is not playing.

The reasons seems to be the file path of the movie file:

\includemovie[]{9.1cm}{5.5cm}{./smootherMG_low.avi}

Note the ./ in front of the file name.  If I omit the ./ then the movie plays just like it should.



Reproducible: Always
Comment 1 Oliver Sander 2012-07-09 09:14:18 UTC
Created attachment 72395 [details]
pdf containing the movie that won't play
Comment 2 Oliver Sander 2012-07-09 09:14:41 UTC
Created attachment 72396 [details]
Corresponding tex sources
Comment 3 Oliver Sander 2012-07-09 09:15:13 UTC
Created attachment 72397 [details]
Example movie file
Comment 4 Tobias Koenig 2012-07-11 10:26:08 UTC
Git commit 06b0cf86169a92802ff4e4df0e9d22bc67b387fb by Tobias Koenig.
Committed on 11/07/2012 at 12:24.
Pushed by tokoe into branch 'master'.

Always create temporary movie files with a sane name

M  +2    -1    core/movie.cpp

http://commits.kde.org/okular/06b0cf86169a92802ff4e4df0e9d22bc67b387fb
Comment 5 Oliver Sander 2012-07-11 13:05:50 UTC
Thanks, the movie plays now.  However, looking at the patch suggests a few ways to create other non-playing situations.  For example, having the filename start with ././ makes the movie not play again (admittedly, this is a bit contrived).  But less contrived: when I specify the movie file by absolute path okular won't play it either.
Comment 6 Fabio D'Urso 2012-07-11 14:39:04 UTC
Created attachment 72456 [details]
Patch to use KTemporaryFile

What about a plain KTemporaryFile?
Note that, with the attached diff, the extension is not preserved any more. However, it seems to work even without it.
Comment 7 Oliver Sander 2012-07-11 15:36:18 UTC
For the record: Tobias fixed this properly in commit 4c8f0bc5def7c755ab810adec78826fd51f713b1
Thanks!