projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45dd5c6
)
better than nothing patch for correct audio output with ffplay
author
Fabrice Bellard
<fabrice@bellard.org>
Tue, 19 Nov 2002 18:21:18 +0000
(18:21 +0000)
committer
Fabrice Bellard
<fabrice@bellard.org>
Tue, 19 Nov 2002 18:21:18 +0000
(18:21 +0000)
Originally committed as revision 1230 to svn://svn.ffmpeg.org/ffmpeg/trunk
libav/audio.c
patch
|
blob
|
blame
|
history
diff --git
a/libav/audio.c
b/libav/audio.c
index
34da590
..
4fa155c
100644
(file)
--- a/
libav/audio.c
+++ b/
libav/audio.c
@@
-64,7
+64,8
@@
static int audio_open(AudioData *s, int is_output)
}
/* non blocking mode */
- fcntl(audio_fd, F_SETFL, O_NONBLOCK);
+ if (!is_output)
+ fcntl(audio_fd, F_SETFL, O_NONBLOCK);
s->frame_size = AUDIO_BLOCK_SIZE;
#if 0
@@
-177,7
+178,7
@@
static int audio_write_packet(AVFormatContext *s1, int stream_index,
if (s->buffer_ptr >= AUDIO_BLOCK_SIZE) {
for(;;) {
ret = write(s->fd, s->buffer, AUDIO_BLOCK_SIZE);
- if (ret
!=
0)
+ if (ret
>
0)
break;
if (ret < 0 && (errno != EAGAIN && errno != EINTR))
return -EIO;