diff options
author | wm4 <wm4@nowhere> | 2013-11-12 23:42:04 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-12 23:42:04 +0100 |
commit | e4bbb1d348dafbb32722f413648006a7bd9d0897 (patch) | |
tree | 7165ed9f86a77b751187600d0a9de8b35416f380 /audio/filter/af_export.c | |
parent | e4f2fcc0ecd31322df65141edf0ddbff9c075f5d (diff) | |
parent | 22b3f522cacfbdba76d311c86efd6091512eb089 (diff) | |
download | mpv-e4bbb1d348dafbb32722f413648006a7bd9d0897.tar.bz2 mpv-e4bbb1d348dafbb32722f413648006a7bd9d0897.tar.xz |
Merge branch 'planar_audio'
Conflicts:
audio/out/ao_lavc.c
Diffstat (limited to 'audio/filter/af_export.c')
-rw-r--r-- | audio/filter/af_export.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/audio/filter/af_export.c b/audio/filter/af_export.c index 45143075a1..5e1096f85a 100644 --- a/audio/filter/af_export.c +++ b/audio/filter/af_export.c @@ -183,9 +183,6 @@ static int control(struct af_instance* af, int cmd, void* arg) */ static void uninit( struct af_instance* af ) { - free(af->data); - af->data = NULL; - if(af->setup){ af_export_t* s = af->setup; if (s->buf) @@ -213,9 +210,9 @@ static struct mp_audio* play( struct af_instance* af, struct mp_audio* data ) { struct mp_audio* c = data; // Current working data af_export_t* s = af->setup; // Setup for this instance - int16_t* a = c->audio; // Incomming sound + int16_t* a = c->planes[0]; // Incomming sound int nch = c->nch; // Number of channels - int len = c->len/c->bps; // Number of sample in data chunk + int len = c->samples*c->nch; // Number of sample in data chunk int sz = s->sz; // buffer size (in samples) int flag = 0; // Set to 1 if buffer is filled @@ -259,10 +256,8 @@ static int af_open( struct af_instance* af ) af->control = control; af->uninit = uninit; af->play = play; - af->mul=1; - af->data = calloc(1, sizeof(struct mp_audio)); af->setup = calloc(1, sizeof(af_export_t)); - if((af->data == NULL) || (af->setup == NULL)) + if(af->setup == NULL) return AF_ERROR; ((af_export_t *)af->setup)->filename = mp_find_user_config_file(SHARED_FILE); |