MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / syncAudioWork

Function syncAudioWork

libhb/sync.c:3037–3065  ·  view source on GitHub ↗

* SyncAudio *********************************************************************** * **********************************************************************/

Source from the content-addressed store, hash-verified

3035 *
3036 **********************************************************************/
3037static int syncAudioWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
3038 hb_buffer_t ** buf_out )
3039{
3040 hb_work_private_t * pv = w->private_data;
3041 hb_buffer_t * in = *buf_in;
3042
3043 if (pv->stream->done)
3044 {
3045 flushStreamsLock(pv->common);
3046 return HB_WORK_DONE;
3047 }
3048 if (in->s.flags & HB_BUF_FLAG_EOF)
3049 {
3050 pv->stream->flush = 1;
3051 flushStreamsLock(pv->common);
3052 return HB_WORK_DONE;
3053 }
3054
3055 *buf_in = NULL;
3056 QueueBuffer(pv->stream, in);
3057 Synchronize(pv->stream);
3058
3059 if (pv->stream->done)
3060 {
3061 flushStreamsLock(pv->common);
3062 return HB_WORK_DONE;
3063 }
3064 return HB_WORK_OK;
3065}
3066
3067hb_work_object_t hb_sync_audio =
3068{

Callers

nothing calls this directly

Calls 3

flushStreamsLockFunction · 0.85
QueueBufferFunction · 0.85
SynchronizeFunction · 0.85

Tested by

no test coverage detected