[FFmpeg-trac] #861(avformat:new): problem with ffio_limit

FFmpeg trac at avcodec.org
Sat Dec 31 06:58:15 CET 2011

#861: problem with ffio_limit
             Reporter:  exobuzz   |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avformat  |                  Version:  unspecified
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
 since ffmpeg commit 27d323577c19af218f8a5ac33364f213b623a023 dvd playback
 (via libdvdnav) with xbmc4xbox hasn't worked. I have reverted this commit
 and all is fine. When the code has got to

 if(s->maxsize>=0 && remaining+1 < size){

 remaining is a negative number and so the size is reest.

 when entering the function ffio_limit

 s->maxsize is 0
 avio_tell(s) is a gradually increasing number as each packet is processed
 (i assume this is called for each packet of data ?)

 avio_size(s) returns 0.

 I assume this is related to the way ffmpeg is being used by the xbmc4xbox
 code, and so the size is not known, so I guess this function needs a check
 for that, or we need to pass ffmpeg some additional information?

 in anycase, when the code

 size= remaining+1;

 is run and size is set to for example -2354555 you can imagine things
 don't work right.


 the code before that last commit had

 if(s->maxsize>=0 && remaining>=0 && remaining+1 < size){

 and so size never got reset as remaining was negative.

 - apologies if my understanding is wrong, as I am not familiar with the
 ffmpeg code. Please advise me if this is something we need to change in
 our code, or if ffmpeg should skip this if maxsize / avio_size is 0 for

Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/861>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list