Mercurial > libavformat.hg
diff x11grab.c @ 2274:b21c2af60bc9 libavformat
Replace all occurrences of AVERROR_IO with AVERROR(EIO).
author | takis |
---|---|
date | Thu, 19 Jul 2007 15:23:32 +0000 |
parents | 06083249909c |
children | 7192ab16a21a |
line wrap: on
line diff
--- a/x11grab.c Thu Jul 19 15:21:30 2007 +0000 +++ b/x11grab.c Thu Jul 19 15:23:32 2007 +0000 @@ -80,7 +80,7 @@ * @param ap Parameters from avformat core * @return <ul> * <li>ENOMEM no memory left</li> - * <li>AVERROR_IO other failure case</li> + * <li>AVERROR(EIO) other failure case</li> * <li>0 success</li> * </ul> */ @@ -109,12 +109,12 @@ dpy = XOpenDisplay(param); if(!dpy) { av_log(s1, AV_LOG_ERROR, "Could not open X display.\n"); - return AVERROR_IO; + return AVERROR(EIO); } if (!ap || ap->width <= 0 || ap->height <= 0 || ap->time_base.den <= 0) { av_log(s1, AV_LOG_ERROR, "AVParameters don't have any video size. Use -s.\n"); - return AVERROR_IO; + return AVERROR(EIO); } st = av_new_stream(s1, 0); @@ -148,7 +148,7 @@ if (!XShmAttach(dpy, &x11grab->shminfo)) { av_log(s1, AV_LOG_ERROR, "Fatal: Failed to attach shared memory!\n"); /* needs some better error subroutine :) */ - return AVERROR_IO; + return AVERROR(EIO); } } else { image = XGetImage(dpy, RootWindow(dpy, DefaultScreen(dpy)), @@ -176,7 +176,7 @@ } else { av_log(s1, AV_LOG_ERROR, "RGB ordering at image depth %i not supported ... aborting\n", image->bits_per_pixel); av_log(s1, AV_LOG_ERROR, "color masks: r 0x%.6lx g 0x%.6lx b 0x%.6lx\n", image->red_mask, image->green_mask, image->blue_mask); - return AVERROR_IO; + return AVERROR(EIO); } break; case 24: @@ -191,7 +191,7 @@ } else { av_log(s1, AV_LOG_ERROR,"rgb ordering at image depth %i not supported ... aborting\n", image->bits_per_pixel); av_log(s1, AV_LOG_ERROR, "color masks: r 0x%.6lx g 0x%.6lx b 0x%.6lx\n", image->red_mask, image->green_mask, image->blue_mask); - return AVERROR_IO; + return AVERROR(EIO); } break; case 32: @@ -207,7 +207,7 @@ input_pixfmt = PIX_FMT_ARGB32; } else { av_log(s1, AV_LOG_ERROR,"image depth %i not supported ... aborting\n", image->bits_per_pixel); - return AVERROR_IO; + return AVERROR(EIO); } #endif input_pixfmt = PIX_FMT_RGB32; @@ -459,7 +459,7 @@ } if (av_new_packet(pkt, s->frame_size) < 0) { - return AVERROR_IO; + return AVERROR(EIO); } pkt->pts = curtime;