[FFmpeg-devel] [PATCH] h264 bitstream filter
Benoit Fouet
benoit.fouet
Thu Aug 30 16:10:45 CEST 2007
Baptiste Coudurier wrote:
> 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.
>
>
priv_data_size is not known at that time, that's why i didn't fill this
field here...
but i already use the private data in structure context...
would a patch like the attached one be ok ?
that would allow me to check for bsfc->priv_data instead of my (ugly)
static value.
--
Ben
Purple Labs S.A.
www.purplelabs.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bsf.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070830/9edc63c0/attachment.asc>
More information about the ffmpeg-devel
mailing list