decoder: removed "plugin" from the decoder struct
decoder.plugin was a write-only attribute.
This commit is contained in:
parent
343a8a20e3
commit
8cbdc2667e
|
@ -23,8 +23,6 @@
|
||||||
#include "pcm_utils.h"
|
#include "pcm_utils.h"
|
||||||
|
|
||||||
struct decoder {
|
struct decoder {
|
||||||
const struct decoder_plugin *plugin;
|
|
||||||
|
|
||||||
struct pcm_convert_state conv_state;
|
struct pcm_convert_state conv_state;
|
||||||
|
|
||||||
bool seeking;
|
bool seeking;
|
||||||
|
|
|
@ -123,7 +123,6 @@ static void decoder_run(void)
|
||||||
continue;
|
continue;
|
||||||
if (!decoder_try_decode(plugin, &input_stream))
|
if (!decoder_try_decode(plugin, &input_stream))
|
||||||
continue;
|
continue;
|
||||||
decoder.plugin = plugin;
|
|
||||||
ret = plugin->stream_decode(&decoder,
|
ret = plugin->stream_decode(&decoder,
|
||||||
&input_stream);
|
&input_stream);
|
||||||
break;
|
break;
|
||||||
|
@ -136,7 +135,6 @@ static void decoder_run(void)
|
||||||
/* we already know our mp3Plugin supports streams, no
|
/* we already know our mp3Plugin supports streams, no
|
||||||
* need to check for stream{Types,DecodeFunc} */
|
* need to check for stream{Types,DecodeFunc} */
|
||||||
if ((plugin = decoder_plugin_from_name("mp3"))) {
|
if ((plugin = decoder_plugin_from_name("mp3"))) {
|
||||||
decoder.plugin = plugin;
|
|
||||||
ret = plugin->stream_decode(&decoder,
|
ret = plugin->stream_decode(&decoder,
|
||||||
&input_stream);
|
&input_stream);
|
||||||
}
|
}
|
||||||
|
@ -151,11 +149,9 @@ static void decoder_run(void)
|
||||||
if (plugin->file_decode != NULL) {
|
if (plugin->file_decode != NULL) {
|
||||||
input_stream_close(&input_stream);
|
input_stream_close(&input_stream);
|
||||||
close_instream = false;
|
close_instream = false;
|
||||||
decoder.plugin = plugin;
|
|
||||||
ret = plugin->file_decode(&decoder, uri);
|
ret = plugin->file_decode(&decoder, uri);
|
||||||
break;
|
break;
|
||||||
} else if (plugin->stream_decode != NULL) {
|
} else if (plugin->stream_decode != NULL) {
|
||||||
decoder.plugin = plugin;
|
|
||||||
ret = plugin->stream_decode(&decoder,
|
ret = plugin->stream_decode(&decoder,
|
||||||
&input_stream);
|
&input_stream);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue