[MPlayer-dev-eng] [PATCH] Fix the handling of growing files

Balazs Kezes rlblaster at gmail.com
Sat Mar 3 20:12:48 CET 2012


Mplayer currently doesn't seem to handle the growing files. They are
usually used when you stream something from the web (e.g. youtube-dl).

Now when mplayer reaches the offset which was the size at the open time
it just quits with various errors.


Here's a simple way to reproduce. Get/download a movie and do the
following (let's name our movie b.mp4):
$ size=$((2*1024*1024))
$ head -c $size b.mp4 > a.mp4

Now start mplayer a.mp4. Tweak the size parameter to have around ~10
seconds of movie. Mplayer will quit when it reaches the 10th second. Now
do this:

$ head -c $size b.mp4 > a.mp4
$ [start the movie in the background and wait until it begins to play]
$ tail -c +$((size+1)) b.mp4 >> a.mp4

Mplayer will still quit at the 10th second even though it could continue
playing (VLC continues to play without a hitch).


Mplayer used to continue playing but it was because ffmpeg was buggy and
stopped working after the following patch has been introduced:
http://patches.libav.org/patch/14105/

I'm not sure how to fix this properly but this patch seems to fix this
on my computer.

There's a related bug to this and this patch seems to fix that too:
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1821

-- 
Balazs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: growing-files.patch
Type: text/x-patch
Size: 1551 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120303/081bb74c/attachment.bin>


More information about the MPlayer-dev-eng mailing list