[FFmpeg-devel] [PATCH][RFC] ffmpeg: remove access to private FILE struct members on Windows
h.leppkes at gmail.com
Mon Aug 3 20:02:30 CEST 2015
On Mon, Aug 3, 2015 at 7:26 PM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Mon, Aug 03, 2015 at 05:21:58PM +0200, Nicolas George wrote:
>> Le sextidi 16 thermidor, an CCXXIII, Hendrik Leppkes a écrit :
>> > The FILE struct is opaque in MSVC 2015, and the members of this struct
>> > were never meant to be accessed in any case.
>> > No conditions are known where this check was needed to get characters
>> > from stdin.
>> > ---
>> > If someone does know which particular purpose this check serves, please
>> > do let me know, and I'll be more than willing to find a solution which
>> > does not involve accessing private/undocumented APIs.
>> The offending commit is this one:
>> It says "Based on code by Rolf Siegrist".
>> My guess is: the test serves if other parts of the program already did read
>> from stdin using the stdio API: peek in the sdtdio buffer before reading
>> from the actual file descriptor.
>> Since in FFmpeg nothing else reads from stdin, this should not be needed.
>> Knowing where Rolf Siegrist's code was taken from exactly would help to make
> i looked in my inbox and i found the patch but not the corresponding
> prior communication that it seems to refer to ...
> This seems to have been related to some usecase like this:
> echo 'Call 5 reinit fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf:text=HalloWold:fontcolor=white' |./ffmpeg -vf drawtext='fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf:text=TEst:fontcolor=white' -i matrixbench_mpeg2.mpg -y out2999.avi
> does this help ?
Interesting usage for sure.
But I can confirm that this command still works after the change just
fine, and the drawn text changes after 5 seconds.
More information about the ffmpeg-devel