lavd/caca: create display *after* checking dither options
authorStefano Sabatini <stefasab@gmail.com>
Sat, 21 Jul 2012 15:16:01 +0000 (17:16 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Sun, 22 Jul 2012 08:32:21 +0000 (10:32 +0200)
commitc0b91348fe4aec7d2245d95ccabb460a6971e361
tree1c4f92b0a6fe945557979817ddd42431792b613f
parent9ce0e19ab61e99cdfe29fcce84b9f6a7f17b431c
lavd/caca: create display *after* checking dither options

Avoid fastidious creation and immediate destroy of the display in case
one of the dither options fails to be set.

Also add NULL checks in write_trailer(), which are now necessary since
the function can be called when not all the components have been
initialized.
libavdevice/caca.c