aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice/alsa-audio.h
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-06-22 16:38:20 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-07-09 16:01:06 -0400
commite35c674d13a7f180412cfe058530a2e7f1d49a90 (patch)
treea719cbd75f877a31902d100a920c36e9bf30c966 /libavdevice/alsa-audio.h
parent8bfd7f6a475225a0595bf657f8b99a8fffb461e4 (diff)
downloadffmpeg-e35c674d13a7f180412cfe058530a2e7f1d49a90.tar.gz
alsa: limit buffer_size to 32768 frames.
In testing, the file output plugin gave a max buffer size of about 20 million frames, which is way more than what is really needed and causes a memory allocation error on my system.
Diffstat (limited to 'libavdevice/alsa-audio.h')
-rw-r--r--libavdevice/alsa-audio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavdevice/alsa-audio.h b/libavdevice/alsa-audio.h
index 1e0be1cac7..ee43463696 100644
--- a/libavdevice/alsa-audio.h
+++ b/libavdevice/alsa-audio.h
@@ -40,6 +40,8 @@
other formats */
#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
+#define ALSA_BUFFER_SIZE_MAX 32768
+
typedef struct {
AVClass *class;
snd_pcm_t *h;