[Ffmpeg-devel] [PATCH] reduce MAX_SCAN_PACKETS in mpegts.c

Nico Sabbi nicola_sabbi
Sun Aug 27 00:49:57 CEST 2006


Michael Niedermayer wrote:

>Hi
>
>On Sat, Aug 26, 2006 at 10:59:01PM +0200, Nico Sabbi wrote:
>  
>
>i think so ...
>
>  
>
>>(yet, it's still not enough to obtain what I need, because the probesize 
>>is set
>>after av_open_input_file(&ic, ) ; any advice? )
>>    
>>
>
>hmm maybe changing av_open_input_stream() from
>    ic = av_alloc_format_context();
>    [...]
>    *ic_ptr = ic;
>to
>    if(ap->alloc_context)
>        ic = av_alloc_format_context();
>    else
>        ic= *ic_ptr;
>    [...]
>    *ic_ptr = ic;
>  
>

yes, but in order not to break the existing API I preferred to
change that block to

    if(!ap->prealloced_context)
        ic = av_alloc_format_context();
    else
        ic= *ic_ptr;



>would help?
>alternatively you could pass the threshold over AVFormatParameters, but
>somehow i never liked AVFormatParameters, as you tend to end up copying
>and dupliating variables, it also doesnt fit into the AVOption stuff at
>all ...
>
>
>[...]
>  
>

I agree. Updated patch attached.
Thanks for your help
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avformatparams2.diff
Type: text/x-patch
Size: 5743 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060827/f1329b63/attachment.bin>



More information about the ffmpeg-devel mailing list