output/httpd: initialize unflushed_input

This fixes the following valgrind warning occuring on the first call of
httpd_output_read_page:
==20124== Conditional jump or move depends on uninitialised value(s)
==20124==    at 0x425E65: httpd_output_read_page (httpd_output_plugin.c:240)
==20124==    by 0x426087: httpd_output_open (httpd_output_plugin.c:279)
==20124==    by 0x41D862: ao_open (output_plugin.h:206)
==20124==    by 0x41E133: audio_output_task (output_thread.c:590)
This commit is contained in:
Thomas Jansen 2011-02-04 10:22:00 +01:00 committed by Max Kellermann
parent 8b2f4fc823
commit e776c605ad
2 changed files with 3 additions and 0 deletions

2
NEWS
View File

@ -2,6 +2,8 @@ ver 0.16.2 (2011/??/??)
* decoder: * decoder:
- tremor: fix configure test - tremor: fix configure test
- gme: detect end of song - gme: detect end of song
* output:
- httpd: fix uninitialized variable
ver 0.16.1 (2011/01/09) ver 0.16.1 (2011/01/09)

View File

@ -123,6 +123,7 @@ httpd_output_init(G_GNUC_UNUSED const struct audio_format *audio_format,
/* initialize metadata */ /* initialize metadata */
httpd->metadata = NULL; httpd->metadata = NULL;
httpd->unflushed_input = 0;
/* initialize encoder */ /* initialize encoder */