[FFmpeg-devel] avformat/flvdec: Set broken_sizes for FlixEngine.

Submitted by Nikolas Bowe on Feb. 16, 2018, 11:25 p.m.

Details

Message ID 20180216232517.32583-1-nbowe@google.com
State New
Headers show

Commit Message

Nikolas Bowe Feb. 16, 2018, 11:25 p.m.
---
 libavformat/flvdec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Tomas Härdin Feb. 17, 2018, 1:06 p.m.
fre 2018-02-16 klockan 15:25 -0800 skrev Nikolas Bowe:
> ---
>  libavformat/flvdec.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
> index 0217cef842..b86451fcbf 100644
> --- a/libavformat/flvdec.c
> +++ b/libavformat/flvdec.c
> @@ -598,7 +598,9 @@ static int amf_parse_object(AVFormatContext *s,
> AVStream *astream,
>                          if (version > 0 && version <= 655)
>                              flv->broken_sizes = 1;
>                      }
> -                } else if (!strcmp(key, "metadatacreator") &&
> !strcmp(str_val, "MEGA")) {
> +                } else if (!strcmp(key, "metadatacreator")
> +                    && (!strcmp(str_val, "MEGA")
> +                        || !strncmp(str_val, "FlixEngine", 10))) {

Nit: please align the inner str(n)cmp:s

FlixEngine is the VP6 thing, right? Awful, awful tool. Patch probably
OK though

/Tomas
Nikolas Bowe Feb. 21, 2018, 10:53 p.m.
On Fri, Feb 16, 2018 at 3:25 PM, Nikolas Bowe <nbowe@google.com> wrote:

> ---
>  libavformat/flvdec.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
> index 0217cef842..b86451fcbf 100644
> --- a/libavformat/flvdec.c
> +++ b/libavformat/flvdec.c
> @@ -598,7 +598,9 @@ static int amf_parse_object(AVFormatContext *s,
> AVStream *astream,
>                          if (version > 0 && version <= 655)
>                              flv->broken_sizes = 1;
>                      }
> -                } else if (!strcmp(key, "metadatacreator") &&
> !strcmp(str_val, "MEGA")) {
> +                } else if (!strcmp(key, "metadatacreator")
> +                    && (!strcmp(str_val, "MEGA")
> +                        || !strncmp(str_val, "FlixEngine", 10))) {
>                      flv->broken_sizes = 1;
>                  }
>              }
> --
> 2.16.1.291.g4437f3f132-goog
>
>
For a bit of context, we found some very old videos which suffered from
corruption after 9e6a2427558a718be0c1fffacffd935f630a7a8d, but were fine
before.
These had "End of AC stream reached in vp6_parse_coeff" warnings in logs.
These also had flv Packet mismatch warnings.
Adding FlixEngine to the list of flv muxers which produce broken packet
sizes fixes this corruption.

FlixEngine is very old and not maintained or available anymore (since
2010), so we won't need to worry about newer versions fixing the issue.
Michael Niedermayer Feb. 22, 2018, 9:52 p.m.
On Sat, Feb 17, 2018 at 02:06:20PM +0100, Tomas Härdin wrote:
> fre 2018-02-16 klockan 15:25 -0800 skrev Nikolas Bowe:
> > ---
> >  libavformat/flvdec.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
> > index 0217cef842..b86451fcbf 100644
> > --- a/libavformat/flvdec.c
> > +++ b/libavformat/flvdec.c
> > @@ -598,7 +598,9 @@ static int amf_parse_object(AVFormatContext *s,
> > AVStream *astream,
> >                          if (version > 0 && version <= 655)
> >                              flv->broken_sizes = 1;
> >                      }
> > -                } else if (!strcmp(key, "metadatacreator") &&
> > !strcmp(str_val, "MEGA")) {
> > +                } else if (!strcmp(key, "metadatacreator")
> > +                    && (!strcmp(str_val, "MEGA")
> > +                        || !strncmp(str_val, "FlixEngine", 10))) {
> 
> Nit: please align the inner str(n)cmp:s

will fix the formating (ill actually split the if, it looks cleaner
as 2 ifs)
and will apply

thx


> 
> FlixEngine is the VP6 thing, right? Awful, awful tool. Patch probably
> OK though
> 
> /Tomas
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Patch hide | download patch | download mbox

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 0217cef842..b86451fcbf 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -598,7 +598,9 @@  static int amf_parse_object(AVFormatContext *s, AVStream *astream,
                         if (version > 0 && version <= 655)
                             flv->broken_sizes = 1;
                     }
-                } else if (!strcmp(key, "metadatacreator") && !strcmp(str_val, "MEGA")) {
+                } else if (!strcmp(key, "metadatacreator")
+                    && (!strcmp(str_val, "MEGA")
+                        || !strncmp(str_val, "FlixEngine", 10))) {
                     flv->broken_sizes = 1;
                 }
             }