#113 Infinite loop when keep-download=1

CVS
closed-fixed
Plugin (92)
5
2006-08-17
2006-08-17
No

I'm using 3.30. If the keep-download option is set to
1, the plugin seems to ignore any loop parameter that
is given and loops infinitely. It actually works the
first time but on subsequent tries, it doesn't work
until the downloaded file has been deleted. I
discovered this while testing out the onEndOfStream
event.

Discussion

  • Kevin DeKorte

    Kevin DeKorte - 2006-08-17

    Logged In: YES
    user_id=685413

    Can you post the mplayerplug-in.conf file and the embed tag
    you are using? I took a quick look and don't really see how
    they are related yet.

     
  • James Le Cuirot

    James Le Cuirot - 2006-08-17

    Logged In: YES
    user_id=770758

    vo=xv,x11
    ao=alsa
    cachesize=512
    cache-percent=15
    dload-dir=/home/chewi/Embedded-Media
    showtime=1
    enable-wmp=1
    enable-qt=1
    enable-rm=1
    enable-gmp=1
    enable-dvx=1
    enable-mpeg=1
    enable-mp3=1
    enable-ogg=1
    enable-midi=1
    enable-pls=1
    enable-smil=1
    enable-helix=1
    nomediacache=0
    nopauseonhide=1
    rtsp-use-tcp=0
    rtsp-use-http=0
    download=1
    keep-download=1

    <embed loop="1" type="video/divx" src="http://
    www.alternativehairclub.org/ah-video/ah-divx-128.avi"
    width="320" height="260"></embed>

     
  • Kevin DeKorte

    Kevin DeKorte - 2006-08-17

    Logged In: YES
    user_id=685413

    Ok, I think I have fixed this in CVS. I found that the
    keep-download flag was being ignored in some cases. Let me
    know if you are still seeing this.

    On your embed tag, if the page that your embed tag is on is
    coming from www.alternativehairclub.org I would recommend
    that the EMBED tag look like this..

    <embed loop="1" type="video/divx"
    src="/ah-video/ah-divx-128.avi"
    width="320" height="260"></embed>

    that just seems to work a little better.

     
  • James Le Cuirot

    James Le Cuirot - 2006-08-17

    Logged In: YES
    user_id=770758

    Still no joy I'm afraid. I built from CVS and tried with
    and without the full URL but it's still the same. (I
    wouldn't normally use the full URL, I was just testing the
    JavaScript)

     
  • Kevin DeKorte

    Kevin DeKorte - 2006-08-17

    Logged In: YES
    user_id=685413

    What are the first 4 lines of the ChangeLog file. I want to
    make sure that the files you got are up to date.

     
  • James Le Cuirot

    James Le Cuirot - 2006-08-17

    Logged In: YES
    user_id=770758

    I think I'm up to date!

    Development
    Make keep-download work when full URL is present
    Rename unHTML to unEscapeXML as it is a better
    description
    Improved unHTML code to remove &amp; and replace it
    with &

     
  • Kevin DeKorte

    Kevin DeKorte - 2006-08-17

    Logged In: YES
    user_id=685413

    Regrab CVS again. I'm pretty sure I got it this time. I did
    some testing with loop=1 loop=2 and loop not present and it
    does what is expected now.

     
  • James Le Cuirot

    James Le Cuirot - 2006-08-17

    Logged In: YES
    user_id=770758

    I think you made it worse. It now plays twice on the first
    attempt and it still plays continuously after that.
    However, I've discovered something very interesting. If I
    play one of the downloaded videos in mplayer without any
    options at all, it actually loops infinitely, even if I
    tell it not to. If I play the video that the download came
    from, it doesn't. The source video and the video saved by
    the plugin actually differ when run against diff. Is that
    supposed to happen?

     
  • Kevin DeKorte

    Kevin DeKorte - 2006-08-17

    Logged In: YES
    user_id=685413

    Gonna need to see a debug log.

    set "debug=1" in the mplayerplug-in.conf
    run firefox from a terminal and when you open the page you
    should get tons of info from mplayerplug-in

     
  • James Le Cuirot

    James Le Cuirot - 2006-08-17

    Logged In: YES
    user_id=770758

    I've made another very interesting discovery and this
    should really make it quite easy to find now. If I delete
    the downloaded file so it downloads a fresh copy, allow it
    to start playing, close the browser and diff the two files,
    they match. If I then open the browser, play the video
    again and then diff the files again, they DON'T match. It
    seems that the downloaded video somehow gets corrupted on
    subsequent loads. Here is a log. In this log, a fresh copy
    was fetched and it played twice (not once as I described in
    my last copy). I then hit refresh and allowed it to play
    twice more. I closed the browser half-way through the next
    play.

    P.S. The filename is different because I'm using a shorter
    video now.

     
  • James Le Cuirot

    James Le Cuirot - 2006-08-17
     
  • James Le Cuirot

    James Le Cuirot - 2006-08-17

    Logged In: YES
    user_id=770758

    Ah I forgot to mention that there was an error on your last
    commit. A ( was missing from plugin-threads.cpp. Line 1711
    I think it was.

     
  • James Le Cuirot

    James Le Cuirot - 2006-08-17

    Logged In: YES
    user_id=770758

    I've figured out why they differ! I can't believe I didn't
    notice this before. Every time the plugin starts, instead
    of just reusing or truncating the existing file, it appends
    to it! It just keeps growing and growing every time and
    that's why mplayer appears to keep looping. It's not really
    looping, it's just playing this really big file that's been
    repeated so many times.

     
  • Kevin DeKorte

    Kevin DeKorte - 2006-08-17

    Logged In: YES
    user_id=685413

    ok, I have fixed the compile error, the code was actually
    wrong anyway, so I had to fix that. And this could cause the
    infinite double play.

    I also have found another error. Where if the initial URL
    redirects to another URL the file could be put in the
    playlist twice. I believe I have fixed that.

    Also, if you are using keep-download and you have two urls
    that result in the same filename, this can cause the kept
    file to be corrupted.

     
  • Kevin DeKorte

    Kevin DeKorte - 2006-08-17

    Test file I am using to debug. Alter the loop parameter in the embed tag

     
  • Kevin DeKorte

    Kevin DeKorte - 2006-08-17

    Logged In: YES
    user_id=685413

    I have put up the file I have been testing with and CVS
    should have all the changes in it.

     
  • Kevin DeKorte

    Kevin DeKorte - 2006-08-17

    Logged In: YES
    user_id=685413

    Just changed the fopen from a+ to w+ this should prevent
    appending to an existing file. CVS updated

     
  • James Le Cuirot

    James Le Cuirot - 2006-08-17
    • status: open --> open-fixed
     
  • James Le Cuirot

    James Le Cuirot - 2006-08-17

    Logged In: YES
    user_id=770758

    Excellent, that did the trick. (-: I was going to say that
    maybe the files should be reused instead of truncated to
    prevent needless redownloading but the files come via the
    browser cache, don't they, so that's already taken care of?
    Thanks for your help and patience.

     
  • James Le Cuirot

    James Le Cuirot - 2006-08-17
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.