[FFmpeg-devel] [PATCH] avformat/dhav: fix backward scanning for get_duration and optimize seeking
    Derek Buitenhuis 
    derek.buitenhuis at gmail.com
       
    Fri Apr  4 15:44:07 EEST 2025
    
    
  
On 3/27/2025 6:18 PM, Andreas Rheinhardt wrote:
> You read into a buffer just to ignore the read data? Why don't you just
> rewrite the loop below to inspect the data directly?
While looking into this, I noticed that this demuxer also does something
similar for the first packet which is not bounded (may scan the whole file)...
which is pretty bad.
This really made me ask: Why on earth are we doing this anyway? We don't
do this in any other demuxer, and it is a very badly behaved way to act,
even if we're not over a network.
That is, can we just remove these hacks?
Also, I noticed this demuxer has a bunch of what appears to be debug stuff
left over that is dead code. In general, it seems pretty bad.
- Derek
    
    
More information about the ffmpeg-devel
mailing list