[FFmpeg-devel] [PATCH] Avoid incorrect deprecated pixel format warning.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Thu May 2 23:53:32 CEST 2013
Should only be printed if a "JPEG" format was used,
not for e.g. XYZ.
---
libswscale/utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libswscale/utils.c b/libswscale/utils.c
index f013940..38d65fe 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1061,13 +1061,14 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
handle_jpeg(&srcFormat);
handle_jpeg(&dstFormat);
+ if(srcFormat!=c->srcFormat || dstFormat!=c->dstFormat)
+ av_log(c, AV_LOG_WARNING, "deprecated pixel format used, make sure you did set range correctly\n");
handle_0alpha(&srcFormat);
handle_0alpha(&dstFormat);
handle_xyz(&srcFormat);
handle_xyz(&dstFormat);
if(srcFormat!=c->srcFormat || dstFormat!=c->dstFormat){
- av_log(c, AV_LOG_WARNING, "deprecated pixel format used, make sure you did set range correctly\n");
c->srcFormat= srcFormat;
c->dstFormat= dstFormat;
}
--
1.7.10.4
More information about the ffmpeg-devel
mailing list