diff mbox

[FFmpeg-devel] change of deprecated log to debug level

Message ID d55e8125-4955-589c-195f-2b8bdb5053cc@gmail.com
State New
Headers show

Commit Message

Thomas Hartwig Sept. 22, 2017, 6:20 a.m. UTC
Attached is the clean patchfile. I want to give some small background: 
the problem happens in javacpp. It looks like there is a problem 
handling pixelformats not correct at all when used for pixel grabbing. 
This is why I mentioned it in a streaming context.
However this patch is a small workaround to this and really minimal. We 
will look more deeply into the wrapper to get rid of it but in the 
meantime....

Thanks
Thomas

On 22.09.2017 05:06, wm4 wrote:
> On Thu, 21 Sep 2017 22:55:14 +0200
> Thomas Hartwig <thomas.hartwig@gmail.com> wrote:
> 
>> The problem is this warning is flooding the console with deprecated
>> warnings for every decoded frame. However decoding works well. This is
>> an issue with an Axis camera H264 stream received via rtsp for instance.
>> There are several complaints about it in the WEB for years now and I
>> could not find a real solution for the underlying problem. It looks like
>> vendors are not changing their encoding easily. ;-)
>>
>>
>> ---
>>     libswscale/utils.c | 2 +-
>>     1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>    diff --git a/libswscale/utils.c b/libswscale/utils.c
>>    index dcab70..af4aa1 100644
>>    --- a/libswscale/utils.c
>>    +++ b/libswscale/utils.c
>>    @@ -1182,7 +1182,7 @@ av_cold int sws_init_context(SwsContext *c,
>> SwsFilter *srcFilter,
>>         c->dstRange |= handle_jpeg(&c->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");
>>    +        av_log(c, AV_LOG_DEBUG, "deprecated pixel format used, make
>> sure you did set range correctly\n");
>>
>>         if (!c->contrast && !c->saturation && !c->dstFormatBpp)
>>             sws_setColorspaceDetails(c,
>> ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], c->srcRange,
>>    --
>>    2.7.4
>> _______________________________________________
> 
> I'd rather have if we finally stopped using these pixfmts. They cause
> nothing but problems to me.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Comments

Michael Niedermayer Sept. 23, 2017, 2:53 p.m. UTC | #1
On Fri, Sep 22, 2017 at 08:20:24AM +0200, Thomas Hartwig wrote:
> Attached is the clean patchfile. I want to give some small
> background: the problem happens in javacpp. It looks like there is a
> problem handling pixelformats not correct at all when used for pixel
> grabbing. This is why I mentioned it in a streaming context.
> However this patch is a small workaround to this and really minimal.
> We will look more deeply into the wrapper to get rid of it but in
> the meantime....

iam not against applying this patch, if people want it.
But iam not sure this is overall really a good idea ...

[...]
diff mbox

Patch

---
 libswscale/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index dcab70..af4aa1 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1182,7 +1182,7 @@  av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
     c->dstRange |= handle_jpeg(&c->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");
+        av_log(c, AV_LOG_DEBUG, "deprecated pixel format used, make sure you did set range correctly\n");
 
     if (!c->contrast && !c->saturation && !c->dstFormatBpp)
         sws_setColorspaceDetails(c, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], c->srcRange,
-- 
2.7.4