[FFmpeg-devel] [PATCH] FLAC parser

Michael Chinen mchinen
Thu Aug 12 04:31:01 CEST 2010


Hi,

On Thu, Aug 12, 2010 at 4:13 AM, Justin Ruggles
<justin.ruggles at gmail.com> wrote:
> Hi,
>
> Michael Chinen wrote:
>
>> Updated patch attached with one note:
>>
>> On Wed, Aug 11, 2010 at 11:52 PM, Justin Ruggles
>> <justin.ruggles at gmail.com> wrote:
>> [...]
>>> As for the code duplication, maybe you could use something like this:
>>>
>>> static int check_header_mismatch(AVCodecContext *avctx,
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? FLACFrameInfo *header,
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? FLACFrameInfo *child,
>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? int log_warning)
>>
>> Thanks, this was a good idea and I refactored the code accordingly. ?I
>> left out log_warning and just checked avctx for non-NULL instead. ?If
>> we need to log to NULL contexts we can change it in the future, but
>> right now it doesn't do so.
>
> Looks good. ?One more suggestion though.
>
>> + ? ? ? ? ? ?/* Look at the child's frame header info and penalize changes. */
>> + ? ? ? ? ? ?child_score = score_header(child);
>> +
>> + ? ? ? ? ? ?/* Penalize suspicious changes between the headers. ? ? ? ? ? ?*/
>> + ? ? ? ? ? ?child_score -= check_header_mismatch(NULL, &header->fi, &child->fi);
>
> /* Look at the child's frame header info and penalize suspicious changes
> ? between the headers. */
> child_score = score_header(child) -
> ? ? ? ? ? ? ?check_header_mismatch(NULL, &header->fi, &child->fi);

Done.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-FLAC-Parser.patch
Type: application/octet-stream
Size: 38790 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100812/8e3d6083/attachment.obj>



More information about the ffmpeg-devel mailing list