[Ffmpeg-devel] [PATCH] Improve swscale-example
Michael Niedermayer
michaelni
Tue Sep 19 01:35:47 CEST 2006
Hi
On Mon, Sep 18, 2006 at 09:24:40PM +0200, Luca Abeni wrote:
> Hi all,
>
> the attached patch improves swscale-example (and cleans it up a little
> bit) to test the conversion between all the possible pixel formats.
>
>
> Luca
>
[...]
> + srcContext = dstContext = outContext = NULL;
> srcContext= sws_getContext(w, h, PIX_FMT_YUV420P, srcW, srcH, srcFormat, flags, NULL, NULL, NULL);
srcContext is set twice ...
> + if (srcContext == NULL) {
> + printf("Failed to get %s ---> %s\n",
> + sws_format_name(PIX_FMT_YUV420P),
> + sws_format_name(srcFormat));
> + res = -1;
> +
> + goto end;
> + }
> dstContext= sws_getContext(srcW, srcH, srcFormat, dstW, dstH, dstFormat, flags, NULL, NULL, NULL);
> + if (dstContext == NULL) {
> + printf("Failed to get %s ---> %s\n",
> + sws_format_name(srcFormat),
> + sws_format_name(dstFormat));
errors should go to stderr if you dont use av_log()
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel
mailing list