aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2013-12-29 11:29:18 +0100
committerNicolas George <george@nsup.org>2013-12-29 19:51:42 +0100
commitfde219cfa8f6e823c770d57b2fa2a2799a5445e2 (patch)
treee38c7376910895fe4b6f95794125f05e3e430114
parent828ac6d1b515ce421519a641b23b05127acc06cd (diff)
downloadffmpeg-fde219cfa8f6e823c770d57b2fa2a2799a5445e2.tar.gz
lavd/xv: report if no adaptor present.
-rw-r--r--libavdevice/xv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavdevice/xv.c b/libavdevice/xv.c
index ad604825f2..a4b44c8eda 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);