[FFmpeg-devel] [PATCH] lavc/flacdec: Add frame CRC calculation

Paul B Mahol onemda at gmail.com
Thu Feb 21 21:38:49 CET 2013


On 2/21/13, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Thu, Feb 21, 2013 at 01:27:30PM +0100, Hendrik Leppkes wrote:
>> On Thu, Feb 21, 2013 at 1:15 PM, Michael Niedermayer <michaelni at gmx.at>
>> wrote:
>> > On Thu, Feb 21, 2013 at 11:26:32AM +0000, Paul B Mahol wrote:
>> >> From: James Almer <jamrial at gmail.com>
>> >>
>> >> Fixes ticket #2266
>> >>
>> >> Signed-off-by: James Almer <jamrial at gmail.com>
>> >> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> >> ---
>> >>  libavcodec/flacdec.c | 8 +++++++-
>> >>  1 file changed, 7 insertions(+), 1 deletion(-)
>> >
>> > fine with me
>> >
>> > not sure this will be the final solution though, i think some people
>> > want to be able to detect crc errors through API
>>
>> Isn't that what the explode flag is for? Make it return an error if thats
>> set?
>
> it could be used but the explode flag is flawed.
> We want to tell the user application that
> there was an error
> what that error was (not essential)
> return the best possible data we can using error concealment unless
> the user disabled that
>
> explode cannot handle the 3rd requirement and the 2nd is difficult
> with multiple errors
>
> AVFrame.decode_error_flags is a better choice it can handle all these
>

Its ok to add crc flag for decode_error_flags but that is additional info.

If user wants to ignore frames with CRC error or do not want any CRC checking
at all having it done in code is additional bonus.

So add crc error flag to decode_error_flags and use it here and there in
separate commit.

Decide what flag to use from err_recognition to not return frame with failed
crc check.

>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Dictatorship naturally arises out of democracy, and the most aggravated
> form of tyranny and slavery out of the most extreme liberty. -- Plato
>


More information about the ffmpeg-devel mailing list