Browse Source

lavd/v4l2enc: check write return value.

tags/n2.0
Clément Bœsch 12 years ago
parent
commit
9a7f1519aa
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavdevice/v4l2enc.c

+ 2
- 1
libavdevice/v4l2enc.c 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;
}



Loading…
Cancel
Save