update ffmpeg.git files for newer versions
[goodguy/cinelerra.git] / cinelerra-5.1 / thirdparty / src / ffmpeg.git.patch5
1 --- a/libavfilter/formats.c
2 +++ b/libavfilter/formats.c
3 @@ -110,11 +110,13 @@
4         possibly causing a lossy conversion elsewhere in the graph.
5         To avoid that, pretend that there are no common formats to force the
6         insertion of a conversion filter. */
7 -    if (type == AVMEDIA_TYPE_VIDEO)
8 +    if (type == AVMEDIA_TYPE_VIDEO) {
9          for (i = 0; i < a->nb_formats; i++) {
10              const AVPixFmtDescriptor *const adesc = av_pix_fmt_desc_get(a->formats[i]);
11 +            if( !adesc ) continue;
12              for (j = 0; j < b->nb_formats; j++) {
13                  const AVPixFmtDescriptor *bdesc = av_pix_fmt_desc_get(b->formats[j]);
14 +                if( !bdesc ) continue;
15                  alpha2 |= adesc->flags & bdesc->flags & AV_PIX_FMT_FLAG_ALPHA;
16                  chroma2|= adesc->nb_components > 1 && bdesc->nb_components > 1;
17                  if (a->formats[i] == b->formats[j]) {
18 @@ -123,6 +125,7 @@
19                  }
20              }
21          }
22 +    }
23  
24      // If chroma or alpha can be lost through merging then do not merge
25      if (alpha2 > alpha1 || chroma2 > chroma1)