[FFmpeg-trac] #9811(avfilter:new): filter 'zscale=transfer=linear' fails with "code 2050: active window must be positive"

FFmpeg trac at avcodec.org
Wed Jun 15 21:11:51 EEST 2022

#9811: filter 'zscale=transfer=linear' fails with "code 2050: active window must
be positive"
             Reporter:  rminnema     |                    Owner:  (none)
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avfilter
              Version:  git-master   |               Resolution:
             Keywords:               |               Blocked By:
  zimg,zscale,transfer               |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
Comment (by BoKK):

 Replying to [comment:9 Balling]:
 >b) you can reproduce on some modified windows then this is a
 OS/compiler/binary issue.
 First of all, thanks for your patience and kindness.

 About your sentence quoted above, I would like to find what change made to
 my OS could be reacting to recent changes in ffmpeg code. I'm happy if
 this is not a bug in ffmpeg but I'd love to find how to solve it on my end

 This said, and if nobody find it a problem, I'll post what I've found here
 instead of opening a new bug.


 I asked sekrit-twc [zimg] about this to check if something on that library
 could be causing what I'm going to post now and, as I don't know
 programming, I asked him to please take a quick look at commit

 He answered me with a question that I find interesting given my findings.
 The issue I opened there was this one https://github.com/sekrit-
 * I've started from zero to check all of this again. I generated a test
 video with ffmpeg
 ffmpeg -f lavfi -i testsrc=duration=3:size=3840x2160:rate=24000/1001
 * Then I applied a simple rescale filter, with varying values for width
 and height. Command was this, changing 1920 and 1080 values to test the
 ffmpeg -report -i test_in.mkv -vf zscale=size=1920x1080 -c:0 libx265
 * I found something really weird to me
   1. Changing ''only'' horizontal dimension caused no problem at all
   2. Changing ''only'' vertical dimension started throwing a 2050 error on
 very specific numbers, and error plus ffmpeg.exe crash on a range of
   3. The best way I'm able to explain it is with this two screenshots,
 which I hope are easy to understand[[br]]

 Error only appeared when vertical dimensions were 'small-ish', bot not
 every small number triggered it.
 And, as sekrit-twc 'predicted', I am using a 12-cores, 24-threads AMD


 Version ''ffmpeg-2022-05-04-git-0914e3a14a-essentials_build'' compiled by
 GyanD doesn't cause any problem. Newer versions do.

 Also, same test on a virtual machine with a fresh and non-modified Windows
 10 x64 install didn't throw any error. Therefore I suppose '''this is
 going to be hardly reproducible''' by anyone excepting those that by
 chance have customized/modified their OS in the same way.

 I can't pinpoint what change in my OS causes this so I don't know how
 widespread this error might be, but maybe my modified OS is by pure chance
 revealing a potential problem that may be worth investigating at least
 until is traced back to an specific OS problem on my side -- or in
 vf_zscale.c code that could be done differently to be less susceptible of
 interact with OS issues.
Ticket URL: <https://trac.ffmpeg.org/ticket/9811#comment:11>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list