diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-25 13:19:10 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-25 13:28:51 +0200 |
commit | a63096953559ab40b09e125056d2a86bf6a354bb (patch) | |
tree | 6216a10ef1d804620a7031639de6274c058e62d5 /libavdevice/caca.c | |
parent | dd5c2fe17727cba76122ee9a4cfc1ad07a2dd099 (diff) | |
download | ffmpeg-a63096953559ab40b09e125056d2a86bf6a354bb.tar.gz |
avdeviece: Read errno before av_log() as the callback from av_log() might affect errno
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/caca.c')
-rw-r--r-- | libavdevice/caca.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavdevice/caca.c b/libavdevice/caca.c index a118064787..ff54940d31 100644 --- a/libavdevice/caca.c +++ b/libavdevice/caca.c @@ -135,8 +135,8 @@ static int caca_write_header(AVFormatContext *s) c->canvas = caca_create_canvas(c->window_width, c->window_height); if (!c->canvas) { - av_log(s, AV_LOG_ERROR, "Failed to create canvas\n"); ret = AVERROR(errno); + av_log(s, AV_LOG_ERROR, "Failed to create canvas\n"); goto fail; } @@ -145,8 +145,8 @@ static int caca_write_header(AVFormatContext *s) bpp / 8 * encctx->width, 0x0000ff, 0x00ff00, 0xff0000, 0); if (!c->dither) { - av_log(s, AV_LOG_ERROR, "Failed to create dither\n"); ret = AVERROR(errno); + av_log(s, AV_LOG_ERROR, "Failed to create dither\n"); goto fail; } @@ -164,9 +164,9 @@ static int caca_write_header(AVFormatContext *s) c->display = caca_create_display_with_driver(c->canvas, c->driver); if (!c->display) { + ret = AVERROR(errno); av_log(s, AV_LOG_ERROR, "Failed to create display\n"); list_drivers(c); - ret = AVERROR(errno); goto fail; } |