[Ffmpeg-devel] [PATCH] Allow choosing display and screen number for x11grab device
Fri Dec 15 15:11:16 CET 2006
On Wed, Dec 13, 2006 at 10:58:59PM +0100, Panagiotis Issaris wrote:
> On Wed, Dec 13, 2006 at 10:32:21PM +0100, Panagiotis Issaris wrote:
> > > ffmpeg -vd x11:0.1 -s 640x480 test.avi
> > Furthermore, I think there are some errorhandling problems, which I did not want
> > to fix in the same patch, as I wanted to address separate issues in separate
> > patches.
> This is an incremental patch with my first try to fix these error handling
> problems. I'm not sure if this is the correct way to handle errors as I am a
> Xlib-newbie. It seemed cleaner to me to release resources if things fail after
> some allocations succeeded. Furthermore, there's a lot of code duplication,
> which in Linux is avoided by using gotos :) I could also make a function that is
> called on every failure and does all the releasing using one "if (!...)"
> condition per call.
i prefer a goto fail over the code duplication
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Opposition brings concord. Out of discord comes the fairest harmony.
More information about the ffmpeg-devel