Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
muxer libav: do not write new data when an error occured, fixes #2420
  • Loading branch information
perexg committed Oct 26, 2014
1 parent eea8a5a commit 73f781e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/muxer/muxer_libav.c
Expand Up @@ -50,6 +50,11 @@ lav_muxer_write(void *opaque, uint8_t *buf, int buf_size)
int r;
lav_muxer_t *lm = (lav_muxer_t*)opaque;

if (lm->m_errors) {
lm->m_errors++;
return buf_size;
}

r = write(lm->lm_fd, buf, buf_size);
if (r != buf_size)
lm->m_errors++;
Expand Down

0 comments on commit 73f781e

Please sign in to comment.