ffmpeg | branch: master | Paul B Mahol <[email protected]> | Thu Feb 17 09:02:22 
2022 +0100| [b9306afce61be27db5e3860b8abb1f9cea550055] | committer: Paul B Mahol

avfilter/vf_mix: fix handling non-native endianess formats

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9306afce61be27db5e3860b8abb1f9cea550055
---

 libavfilter/vf_mix.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_mix.c b/libavfilter/vf_mix.c
index 9f29efe254..61ab963483 100644
--- a/libavfilter/vf_mix.c
+++ b/libavfilter/vf_mix.c
@@ -59,8 +59,14 @@ static int query_formats(AVFilterContext *ctx)
     int reject_flags = AV_PIX_FMT_FLAG_BITSTREAM |
                        AV_PIX_FMT_FLAG_HWACCEL   |
                        AV_PIX_FMT_FLAG_PAL;
+    int accept_flags = 0;
 
-    return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(0, 
reject_flags));
+    if (!HAVE_BIGENDIAN)
+        reject_flags |= AV_PIX_FMT_FLAG_BE;
+    else
+        accept_flags |= AV_PIX_FMT_FLAG_BE;
+
+    return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(accept_flags, 
reject_flags));
 }
 
 static int parse_weights(AVFilterContext *ctx)

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to