Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);