1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

lavd/v4l2enc: check write return value.

This commit is contained in:
Clément Bœsch 2013-05-20 16:33:14 +02:00
parent f099cdaba3
commit 9a7f1519aa

View File

@ -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;
}