summaryrefslogtreecommitdiffstats
path: root/libhb/platform
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-05-01 14:47:35 +0000
committerjstebbins <[email protected]>2015-05-01 14:47:35 +0000
commit58b25a7664d9d063b404ec39270ff4cdfa333979 (patch)
tree3807be923b500ddc3f618170b7bd7c4900204bdd /libhb/platform
parent3e30a6ef3a449ac4cadb60fa738cc58f974c1794 (diff)
libhb: Use a buffer flat to indicate EOF
... instead of a 0 length buffer. This fixes this issue: https://forum.handbrake.fr/viewtopic.php?f=12&t=31959 Theora can create 0 length output. These 0 length frames indicate duplicate frames. So we can't use 0 length buffers to indicate the end of the stream. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7143 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/platform')
-rw-r--r--libhb/platform/macosx/encca_aac.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libhb/platform/macosx/encca_aac.c b/libhb/platform/macosx/encca_aac.c
index e199f3640..96ee1f04d 100644
--- a/libhb/platform/macosx/encca_aac.c
+++ b/libhb/platform/macosx/encca_aac.c
@@ -503,19 +503,19 @@ int encCoreAudioWork(hb_work_object_t *w, hb_buffer_t **buf_in,
hb_buffer_t **buf_out)
{
hb_work_private_t *pv = w->private_data;
+ hb_buffer_t * in = *buf_in;
hb_buffer_t *buf;
- if ((*buf_in)->size <= 0)
+ *buf_in = NULL;
+ if (in->s.flags & HB_BUF_FLAG_EOF)
{
// EOF on input. Finish encoding what we have buffered then send
// it & the eof downstream.
- *buf_out = Flush(w, *buf_in);
- *buf_in = NULL;
+ *buf_out = Flush(w, in);
return HB_WORK_DONE;
}
- hb_list_add(pv->list, *buf_in);
- *buf_in = NULL;
+ hb_list_add(pv->list, in);
*buf_out = buf = Encode(w);