[FFmpeg-cvslog] avfilter/vf_waveform: do not add tint if output format is gray

Paul B Mahol git at videolan.org
Fri Feb 18 00:04:00 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Feb 17 23:02:56 2022 +0100| [cc2b3201e712211476ca072fe481efa423fad9b9] | committer: Paul B Mahol

avfilter/vf_waveform: do not add tint if output format is gray

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

 libavfilter/vf_waveform.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c
index 33a3ac08d3..2904e97c29 100644
--- a/libavfilter/vf_waveform.c
+++ b/libavfilter/vf_waveform.c
@@ -881,7 +881,7 @@ static av_always_inline void lowpass(WaveformContext *s,
         dst_data += dst_linesize * step;
     }
 
-    if (s->display != OVERLAY && column && !s->rgb) {
+    if (s->display != OVERLAY && column && !s->rgb && out->data[1] && out->data[2]) {
         const int bg = s->bg_color[0];
         const int dst_h = 256;
         const int t0 = s->tint[0];
@@ -905,7 +905,7 @@ static av_always_inline void lowpass(WaveformContext *s,
             dst0 += dst_linesize;
             dst1 += dst_linesize;
         }
-    } else if (s->display != OVERLAY && !s->rgb) {
+    } else if (s->display != OVERLAY && !s->rgb && out->data[1] && out->data[2]) {
         const int bg = s->bg_color[0];
         const int dst_w = 256;
         const int t0 = s->tint[0];



More information about the ffmpeg-cvslog mailing list