[FFmpeg-devel] [PATCH] lavc/xv: report if no adaptor present.

Nicolas George george at nsup.org
Sun Dec 29 11:31:25 CET 2013


Signed-off-by: Nicolas George <george at nsup.org>
---
 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);
 
-- 
1.8.5.2



More information about the ffmpeg-devel mailing list