[FFmpeg-devel] [PATCH]Fix flac with high lpc precision

Michael Niedermayer michaelni at gmx.at
Fri May 15 04:41:02 CEST 2015


On Tue, May 12, 2015 at 01:07:54PM +0200, Carl Eugen Hoyos wrote:
> On Wednesday 06 May 2015 09:27:22 am Carl Eugen Hoyos wrote:
> > Hi!
> >
> > Attached is my attempt to fix ticket #4421 based on the
> > analysis by trac user lvqcl. If the patch is ok,
> 
> > I will add the encoder check to the decoder and 
> > the version bump.
> 
> I failed to implement an autodetection.

you should be able to autodetect it relatively easily

"Lavf56.33.101" is stored in the flac file
if you increse the 101 to 102 when fixing the encoder then this
should allow autodetection at least in theory
if the encoder string isnt in the file due to bitexact flags then
it cannot be detected easily


> 
> Implementation of the option to force buggy decoding was 
> less straightforward than expected, two patches attached.
> 
> Please review, Carl Eugen

>  flacdec.c |   83 ++++++++++++++++++++++++++++++++++----------------------------
>  1 file changed, 46 insertions(+), 37 deletions(-)
> 962ad153d162facc422c7e4d75466ac066f22864  0001-lavc-flacdec-Sanitize-FLACSTREAMINFO-usage.patch
> From b48b02f32538272b20abf99daf2fc5ce9fc26a48 Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <cehoyos at ag.or.at>
> Date: Tue, 12 May 2015 12:47:57 +0200
> Subject: [PATCH 1/2] lavc/flacdec: Sanitize FLACSTREAMINFO usage.
> 
> ---
>  libavcodec/flacdec.c |   83 ++++++++++++++++++++++++++++----------------------
>  1 file changed, 46 insertions(+), 37 deletions(-)
> 
> diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
> index 34a0a70..00b4726 100644
> --- a/libavcodec/flacdec.c
> +++ b/libavcodec/flacdec.c
> @@ -48,7 +48,7 @@
>  
>  
>  typedef struct FLACContext {
> -    FLACSTREAMINFO
> +    struct FLACStreaminfo flac_stream_info;

why not just add AVCLass to FLACCOMMONINFO ? or is there a reason
why that wouldnt work ?

it seems simpler than this if it would work 

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150515/695ad5b2/attachment.asc>


More information about the ffmpeg-devel mailing list