mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
qtwrapper: Replace the hackish 42 magic number with a define
This commit is contained in:
parent
efd840bbb7
commit
02fc41fde5
1 changed files with 5 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue