aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-20 16:33:14 +0200
committerClément Bœsch <ubitux@gmail.com>2013-05-20 16:33:21 +0200
commit9a7f1519aac404104a74e10439a077c9a7b98c61 (patch)
tree4bd7e0bccd90eb8e3e40ea29f4c27e67273348ce /libavdevice
parentf099cdaba38dfaf1eb666df17c6739da500ddbf8 (diff)
downloadffmpeg-9a7f1519aac404104a74e10439a077c9a7b98c61.tar.gz
lavd/v4l2enc: check write return value.
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/v4l2enc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavdevice/v4l2enc.c b/libavdevice/v4l2enc.c
index c766dd4b4c..21f0ef6983 100644
--- a/libavdevice/v4l2enc.c
+++ b/libavdevice/v4l2enc.c
@@ -85,7 +85,8 @@ static av_cold int write_header(AVFormatContext *s1)
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
{
const V4L2Context *s = s1->priv_data;
- write(s->fd, pkt->data, pkt->size);
+ if (write(s->fd, pkt->data, pkt->size) == -1)
+ return AVERROR(errno);
return 0;
}