[MPlayer-cvslog] CVS: main subreader.c,1.147,1.148

Jindrich Makovicka makovick at kmlinux.fjfi.cvut.cz
Sat Mar 18 17:09:58 CET 2006


Ivan Kalvachev wrote:
> 2006/3/18, Jindrich Makovicka <makovick at kmlinux.fjfi.cvut.cz>:
>> I don't think it is necessary with the stream_reset calls. Also, the
>> format detection would have the same problem otherwise, so either revert
>> this or disable the subtitles completely for unseekable streams.
> 
> Not really, the detection reads a line and tries to find know pattern.
> There is very good chanse that subtitles will be detected in the first
> 2k (this is the default stream block size).
> 
> On the other side enca allocates 256kb buffer and tries to fill it.
> This for sure will get out of 2kb range.

Hm... you are right. And stream_reset actually only resets flags, so 
it's useless for unseekable streams.

> Possibe solution:
> 1. add st->block_size check to my function.
> 2. increase st->block size for the subtitle stream.

AFAICS, the buffer size is currently hardcoded.

> 3. decrease enca buffer

Sounds reasonable - I am going to change guess_cp to decrease the buffer 
for unseekable streams instead.

> 4. use cache for subtitles. (another fork())

This is rather ugly.

> Anyway I commited this before i sow your reset fix,  you are free to
> do as you please.

-- 
Jindrich Makovicka




More information about the MPlayer-cvslog mailing list