diff options
author | John Stebbins <[email protected]> | 2015-08-25 09:49:36 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2015-09-24 13:01:44 -0700 |
commit | 2f912311718e522b2fb5e2a06446fe84a4247025 (patch) | |
tree | 3edc8e0bf2940bf455e42c0d697c60b5995995e2 /libhb/encvorbis.c | |
parent | f122f66319ba45d607cfa89ba8f5fcfa5fc44840 (diff) |
libhb: add hb_buffer_list
This brings together several independent implementations of a simple
buffer list manager.
Diffstat (limited to 'libhb/encvorbis.c')
-rw-r--r-- | libhb/encvorbis.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libhb/encvorbis.c b/libhb/encvorbis.c index c4ff206e1..ad5b690bc 100644 --- a/libhb/encvorbis.c +++ b/libhb/encvorbis.c @@ -258,23 +258,26 @@ int encvorbisWork( hb_work_object_t * w, hb_buffer_t ** buf_in, hb_work_private_t * pv = w->private_data; hb_buffer_t * in = *buf_in; hb_buffer_t * buf; + hb_buffer_list_t list; *buf_in = NULL; + hb_buffer_list_clear(&list); if (in->s.flags & HB_BUF_FLAG_EOF) { /* EOF on input - send it downstream & say we're done */ *buf_out = in; - return HB_WORK_DONE; + return HB_WORK_DONE; } - hb_list_add( pv->list, in ); + hb_list_add(pv->list, in); - *buf_out = buf = Encode( w ); - while( buf ) + buf = Encode( w ); + while (buf) { - buf->next = Encode( w ); - buf = buf->next; + hb_buffer_list_append(&list, buf); + buf = Encode( w ); } + *buf_out = hb_buffer_list_clear(&list); return HB_WORK_OK; } |