[FFmpeg-devel] [PATCH][RFC] ffmpeg: remove access to private FILE struct members on Windows
Michael Niedermayer
michael at niedermayer.cc
Mon Aug 3 19:26:30 CEST 2015
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:
>
> http://git.videolan.org/?p=ffmpeg.git;a=commit;h=ca4d71b149ebe32aeaf617ffccf362624b9aafb1
>
> 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
> sure.
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 ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150803/63c0becb/attachment.sig>
More information about the ffmpeg-devel
mailing list