mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
Revert "wavparse: Remove dead assignments, move variable to where it's needed."
Reverts commit 44256a78f8
and use the result in
error reporting so that we can see what's going on.
This commit is contained in:
parent
ace2a84447
commit
7a0c94121f
1 changed files with 16 additions and 11 deletions
|
@ -1142,6 +1142,7 @@ gst_waveparse_ignore_chunk (GstWavParse * wav, GstBuffer * buf, guint32 tag,
|
|||
static GstFlowReturn
|
||||
gst_wavparse_stream_headers (GstWavParse * wav)
|
||||
{
|
||||
GstFlowReturn res;
|
||||
GstBuffer *buf;
|
||||
gst_riff_strf_auds *header = NULL;
|
||||
guint32 tag, size;
|
||||
|
@ -1166,7 +1167,6 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
|
||||
buf = gst_adapter_take_buffer (wav->adapter, size);
|
||||
} else {
|
||||
GstFlowReturn res;
|
||||
if ((res = gst_riff_read_chunk (GST_ELEMENT_CAST (wav), wav->sinkpad,
|
||||
&wav->offset, &tag, &buf)) != GST_FLOW_OK)
|
||||
return res;
|
||||
|
@ -1297,8 +1297,9 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
if (!gst_wavparse_peek_chunk_info (wav, &tag, &size))
|
||||
return GST_FLOW_OK;
|
||||
} else {
|
||||
if (gst_pad_pull_range (wav->sinkpad, wav->offset, 8,
|
||||
&buf) != GST_FLOW_OK)
|
||||
if ((res =
|
||||
gst_pad_pull_range (wav->sinkpad, wav->offset, 8,
|
||||
&buf)) != GST_FLOW_OK)
|
||||
goto header_read_error;
|
||||
tag = GST_READ_UINT32_LE (GST_BUFFER_DATA (buf));
|
||||
size = GST_READ_UINT32_LE (GST_BUFFER_DATA (buf) + 4);
|
||||
|
@ -1354,8 +1355,9 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
gst_adapter_flush (wav->adapter, data_size);
|
||||
} else {
|
||||
gst_buffer_unref (buf);
|
||||
if (gst_pad_pull_range (wav->sinkpad, wav->offset + 8,
|
||||
data_size, &buf) != GST_FLOW_OK)
|
||||
if ((res =
|
||||
gst_pad_pull_range (wav->sinkpad, wav->offset + 8,
|
||||
data_size, &buf)) != GST_FLOW_OK)
|
||||
goto header_read_error;
|
||||
wav->fact = GST_READ_UINT32_LE (GST_BUFFER_DATA (buf));
|
||||
gst_buffer_unref (buf);
|
||||
|
@ -1381,8 +1383,9 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
data_size);
|
||||
} else {
|
||||
gst_buffer_unref (buf);
|
||||
if (gst_pad_pull_range (wav->sinkpad, wav->offset + 8,
|
||||
data_size, &buf) != GST_FLOW_OK)
|
||||
if ((res =
|
||||
gst_pad_pull_range (wav->sinkpad, wav->offset + 8,
|
||||
data_size, &buf)) != GST_FLOW_OK)
|
||||
goto header_read_error;
|
||||
acid = (const gst_riff_acid *) GST_BUFFER_DATA (buf);
|
||||
}
|
||||
|
@ -1415,8 +1418,9 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
ltag = GST_READ_UINT32_LE (data + 8);
|
||||
} else {
|
||||
gst_buffer_unref (buf);
|
||||
if (gst_pad_pull_range (wav->sinkpad, wav->offset, 12,
|
||||
&buf) != GST_FLOW_OK)
|
||||
if ((res =
|
||||
gst_pad_pull_range (wav->sinkpad, wav->offset, 12,
|
||||
&buf)) != GST_FLOW_OK)
|
||||
goto header_read_error;
|
||||
ltag = GST_READ_UINT32_LE (GST_BUFFER_DATA (buf) + 8);
|
||||
}
|
||||
|
@ -1436,8 +1440,9 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
} else {
|
||||
wav->offset += 12;
|
||||
gst_buffer_unref (buf);
|
||||
if (gst_pad_pull_range (wav->sinkpad, wav->offset, data_size,
|
||||
&buf) != GST_FLOW_OK)
|
||||
if ((res =
|
||||
gst_pad_pull_range (wav->sinkpad, wav->offset, data_size,
|
||||
&buf)) != GST_FLOW_OK)
|
||||
goto header_read_error;
|
||||
}
|
||||
/* parse tags */
|
||||
|
|
Loading…
Reference in a new issue