Skip to content
Snippets Groups Projects
Commit 9a7f1519 authored by Clément Bœsch's avatar Clément Bœsch
Browse files

lavd/v4l2enc: check write return value.

parent f099cdab
No related branches found
No related tags found
No related merge requests found
...@@ -85,7 +85,8 @@ static av_cold int write_header(AVFormatContext *s1) ...@@ -85,7 +85,8 @@ static av_cold int write_header(AVFormatContext *s1)
static int write_packet(AVFormatContext *s1, AVPacket *pkt) static int write_packet(AVFormatContext *s1, AVPacket *pkt)
{ {
const V4L2Context *s = s1->priv_data; 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; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment