GNOME Bugzilla – Bug 781458
qtdemux: allow larger files
Last modified: 2017-08-17 10:42:16 UTC
Created attachment 350011 [details] [review] qtdemux: allow larger files For really long files such as contiguous recordings of a whole day, the 50MB limit is not sufficient.
Comment on attachment 350011 [details] [review] qtdemux: allow larger files Makes sense but maybe we should just get rid of the limit at all? Or make it dependent on the track duration (but we might not know that yet?)?
The duration is unknown at that point. I suppose we could remove the limit. The sample count is already checked against the available input data, so it cannot be too large. I'll update the patch.
IIRC the limit was introduced for security/sanity checking reasons so we don't end up mallocing too much and aborting.
In that case, I don't see any other solution than my current patch.
Question then is what exactly is too large. 200MB will be too large already in some cases but not in others, but the same is true for 50MB probably. Any static number here seems wrong, but I don't have any better suggestion either :)
One thing I noticed: We will not abort here. The memory is allocated with g_try_new0() and possible failures are handled correctly. But on Linux it's more likely that the application is killed by the OOM killer anyway. That's not good either.
Attachment 350011 [details] pushed as 61429a7 - qtdemux: allow larger files
I also ran into this with a file containing raw audio