[FFmpeg-devel] [PATCH] h264 bitstream filter

Baptiste Coudurier baptiste.coudurier
Thu Aug 30 14:17:03 CEST 2007


Hi

Benoit Fouet wrote:
> Benoit Fouet wrote:
>> M?ns Rullg?rd wrote:
>>   
>>> Benoit Fouet wrote:
>>>     
>>>> i also think that i can "construct" the sps/pps NALU only once, instead
>>>> of doing it every time, but i don't know how to do it, as bsfs don't
>>>> have a cleanup function...
>>>>     
>>>>       
>>> Well, prepending 00 00 00 01 isn't all that much work...
>>>
>>>   
>>>     
>> i was more thinking of (re)allocation, copying...
>> i think i'll try to use private data allocated by the bsf, as it will be
>> released by av_bitstream_filter_close
>> i'll come back soon with an updated patch, to illustrate.
>>
>>   
> 
> here it is...
> 
> 
> [...]
>
> +
> +    else {
> +        static uint32_t priv_data_size;

I don't think this is threadsafe, and you can have private data in
AVBistreamFilterContext, use it.

> +}
> +
> +AVBitStreamFilter mp4_avc_to_avc_es_bsf = {
> +    "mp4_avc_to_avc_es",
> +    0,

That is priv_data_size according to avcodec.h.

[...]

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list