mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 00:51:37 +00:00
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>
This commit is contained in:
parent
f6b56b1f26
commit
f569592623
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user