[Ffmpeg-devel] [PATCH] Improve swscale-example
Luca Abeni
lucabe72
Wed Sep 20 17:21:31 CEST 2006
Hi Michael,
On Tue, 2006-09-19 at 01:35 +0200, Michael Niedermayer wrote:
[...]
> > + srcContext = dstContext = outContext = NULL;
> > srcContext= sws_getContext(w, h, PIX_FMT_YUV420P, srcW, srcH, srcFormat, flags, NULL, NULL, NULL);
>
> srcContext is set twice ...
Ok, fixed
> > + 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()
Ok, I changed it to fprintf(stderr, ...)
If noone complains, I'll commit the patch in 2 or 3 days.
Thanks,
Luca
--
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
N O W A R ! ! !
More information about the ffmpeg-devel
mailing list