diff options
author | Martin Storsjo <martin@martin.st> | 2011-05-03 14:14:20 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-05-30 08:46:04 +0200 |
commit | 02fc41fde55ea777bed6018aa8bef6dbe164405f (patch) | |
tree | 204ef0ab87441d77df40886e9e0ccaa2c162b8fa /sys/qtwrapper | |
parent | efd840bbb7e398d89ee9d4230e1f9c6250deee6b (diff) |
qtwrapper: Replace the hackish 42 magic number with a define
Diffstat (limited to 'sys/qtwrapper')
-rw-r--r-- | sys/qtwrapper/audiodecoders.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/qtwrapper/audiodecoders.c b/sys/qtwrapper/audiodecoders.c index 718d30cb2..d7791d04f 100644 --- a/sys/qtwrapper/audiodecoders.c +++ b/sys/qtwrapper/audiodecoders.c @@ -62,6 +62,8 @@ #define QTWRAPPER_ADEC_PARAMS_QDATA g_quark_from_static_string("qtwrapper-adec-params") +#define NO_MORE_INPUT_DATA 42 + static GstStaticPadTemplate src_templ = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -745,9 +747,9 @@ process_buffer_cb (ComponentInstance inAudioConverter, return noErr; } - GST_LOG_OBJECT (qtwrapper, "No remaining input data, returning 42 for hack"); + GST_LOG_OBJECT (qtwrapper, "No remaining input data, returning NO_MORE_INPUT_DATA"); - return 42; + return NO_MORE_INPUT_DATA; } static GstFlowReturn @@ -805,8 +807,7 @@ qtwrapper_audio_decoder_chain (GstPad * pad, GstBuffer * buf) (SCAudioInputDataProc) process_buffer_cb, qtwrapper, (UInt32 *) & outsamples, qtwrapper->bufferlist, NULL); - /* TODO: What's this '42' crap?? It does seem to be needed, though. */ - if ((status != noErr) && (status != 42)) { + if ((status != noErr) && (status != NO_MORE_INPUT_DATA)) { if (status < 0) GST_WARNING_OBJECT (qtwrapper, "Error in SCAudioFillBuffer() : %d", (gint32) status); |