[FFmpeg-cvslog] lavd/pulse_audio_enc: fix error check

Lukasz Marek git at videolan.org
Sat Oct 19 00:00:34 CEST 2013


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki at gmail.com> | Fri Oct 18 23:41:19 2013 +0200| [f5695926235c9b2a60af07b21c2d6f1db990cc2a] | committer: Stefano Sabatini

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 at gmail.com>
Signed-off-by: Stefano Sabatini <stefasab at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f5695926235c9b2a60af07b21c2d6f1db990cc2a
---

 libavdevice/pulse_audio_enc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c
index 25caa65..0a3aa1a 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);
     }



More information about the ffmpeg-cvslog mailing list