diff options
author | Lukasz Marek <lukasz.m.luki@gmail.com> | 2013-10-18 23:41:19 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-10-18 23:59:27 +0200 |
commit | f5695926235c9b2a60af07b21c2d6f1db990cc2a (patch) | |
tree | d037ddd4a4d0291785daf48d7fc8b23acffc66b0 | |
parent | f6b56b1f26a1e40a47d85d24b42cd5475cd3b04f (diff) | |
download | ffmpeg-f5695926235c9b2a60af07b21c2d6f1db990cc2a.tar.gz |
lavd/pulse_audio_enc: fix error check
Error check should be done by checking negative value, not non-zero.
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
-rw-r--r-- | libavdevice/pulse_audio_enc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c index 25caa65a95..0a3aa1ad09 100644 --- a/libavdevice/pulse_audio_enc.c +++ b/libavdevice/pulse_audio_enc.c @@ -105,7 +105,7 @@ static int pulse_write_packet(AVFormatContext *h, AVPacket *pkt) if (s->stream_index != pkt->stream_index) return 0; - if ((error = pa_simple_write(s->pa, buf, size, &error))) { + if (pa_simple_write(s->pa, buf, size, &error) < 0) { av_log(s, AV_LOG_ERROR, "pa_simple_write failed: %s\n", pa_strerror(error)); return AVERROR(EIO); } |