On Sun, Jan 05, 2014 at 02:50:40PM +0100, Benjamin Larsson wrote:
> This fixes https://bugzilla.libav.org/show_bug.cgi?id=599.
> 
> MvH
> Benjamin Larsson

> >From 2529a34d6f2a517ddfe27de58ed1c9352b984110 Mon Sep 17 00:00:00 2001
> From: Benjamin Larsson <[email protected]>
> Date: Sun, 5 Jan 2014 14:42:14 +0100
> Subject: [PATCH] flv: Workaround for buggy Omnia A/XE encoder
> 
> The Omnia A/XE encoder writes the explicit extra data incorrectly.
> It disables parametric stereo wrongly, as a fix truncate the extra
> data by setting the size to 2. The aac extra data parser will then
> only parse the correct parts.
> ---
>  libavformat/flvdec.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
> index c65c90c..a83c65b 100644
> --- a/libavformat/flvdec.c
> +++ b/libavformat/flvdec.c
> @@ -915,6 +915,12 @@ skip:
>                  return ret;
>              if (st->codec->codec_id == AV_CODEC_ID_AAC) {
>                  MPEG4AudioConfig cfg;
> +
> +                /* Workaround for buggy Omnia A/XE encoder */
> +                AVDictionaryEntry *t = av_dict_get(s->metadata, "Encoder", 
> NULL, 0);
> +                if (!strcmp(t->value,"Omnia A/XE"))
> +                    st->codec->extradata_size = 2;

t is most likely to be NULL if encoder is not set, so
 if (t && !strcmp(t->value, "Omnia Y/XA"))
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to