[FFmpeg-cvslog] lavd/xv: report if no adaptor present.
Nicolas George
git at videolan.org
Sun Dec 29 21:18:55 CET 2013
ffmpeg | branch: master | Nicolas George <george at nsup.org> | Sun Dec 29 11:29:18 2013 +0100| [fde219cfa8f6e823c770d57b2fa2a2799a5445e2] | committer: Nicolas George
lavd/xv: report if no adaptor present.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fde219cfa8f6e823c770d57b2fa2a2799a5445e2
---
libavdevice/xv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavdevice/xv.c b/libavdevice/xv.c
index ad60482..a4b44c8 100644
--- a/libavdevice/xv.c
+++ b/libavdevice/xv.c
@@ -149,6 +149,10 @@ static int xv_write_header(AVFormatContext *s)
ret = AVERROR_EXTERNAL;
goto fail;
}
+ if (!num_adaptors) {
+ av_log(s, AV_LOG_ERROR, "No X-Video adaptors present\n");
+ return AVERROR(ENODEV);
+ }
xv->xv_port = ai[0].base_id;
XvFreeAdaptorInfo(ai);
More information about the ffmpeg-cvslog
mailing list