MikaTake / lavfilters

lavfilters
GNU General Public License v2.0
0 stars 0 forks source link

Error getting Duration when an image file is loaded #306

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
An image has been loaded into the splitter/decoder. The exact filter graph 
starts with the Async file source because ".tif" hasn't been registered to use 
the LAV Splitter as the source filter.

IMediaSeeking::GetCapabilities returns the AM_SEEKING_CanGetDuration as always, 
but IMediaSeeking::GetDuration fails. I noticed because my program messed up 
due to it thinking this was a zero-frame movie. I added a fudge to treat it as 
a one-frame movie and that worked for me.

I'm currently using LAVFilters-0.54.1-30-g1add067-x64, but I believe this has 
been a problem since the image support was first added.

Original issue reported on code.google.com by LoopinF...@gmail.com on 28 Dec 2012 at 9:24

GoogleCodeExporter commented 9 years ago
I don't think "AM_SEEKING_CanGetDuration" necessarily means that GetDuration is 
guaranteed to always return a duration. GetDuration has a HRESULT which can 
indicate failure, which should be handled in any case.

Original comment by h.lepp...@gmail.com on 28 Dec 2012 at 10:14

GoogleCodeExporter commented 9 years ago
The long term plan is also to repeat images, current idea was to repeat it 
1000x times at 24 fps, for a total of 42 seconds, so it would get a duration.

Original comment by h.lepp...@gmail.com on 28 Dec 2012 at 10:23

GoogleCodeExporter commented 9 years ago
Ahhh, I thought you already did the "repeat 1000x" thing.
Anyway, GetDuration does return an HRESULT of E_FAIL, which seemed wrong to me, 
since AM_SEEKING_CanGetDuration is present and there is indeed at least one 
frame available.
As I said, I've worked around it, but the image file was loaded successfully 
and these APIs seemed to be telling my application that no frames are available.

Original comment by LoopinF...@gmail.com on 28 Dec 2012 at 11:30

GoogleCodeExporter commented 9 years ago
There isn't a defined duration for a single image, and there are plenty other 
file types where determining the duration is not easily possible, so the 
presence of frames does not necessarily mean i can deduce a duration from it.

Original comment by h.lepp...@gmail.com on 29 Dec 2012 at 7:43