1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-30 06:35:23 +00:00
Commit Graph

1424 Commits

Author SHA1 Message Date
Joseph Wallace
d196e75416 Convert ints used as boolean values into actual bools. 2015-12-19 15:32:37 -05:00
Joseph Wallace
1f6a0a497f Replace "long long"s with an appropriate type from <stdint.h> 2015-12-19 15:02:33 -05:00
Joseph Wallace
de004670c3 Be clearer about ebml_parse_sized_int's sign & endian behavior. 2015-12-01 02:21:24 -05:00
Joseph Wallace
e6cb7e26ee Move ebml-private structure definitions out of header file. 2015-11-28 12:49:54 -05:00
Joseph Wallace
0d7448efc7 Change buffer-related sizes & indices to size_t or ssize_t, as applicable. 2015-11-28 12:49:45 -05:00
Joseph Wallace
8a09627d05 Fix type of copy_state in EBML parser to an enum variable. 2015-11-28 12:41:46 -05:00
Joseph Wallace
dc263858a4 Additional format_ebml.c comments. 2015-11-28 12:41:46 -05:00
Joseph Wallace
af238d9129 Move MKV element magic values into proper #define constants. 2015-11-28 12:41:46 -05:00
Joseph Wallace
d394a244f0 Bugfix: Cluster test could have read past the end of the input buffer.
Move the cluster test inside the space-to-read check with the other tests.
2015-11-28 12:41:46 -05:00
Joseph Wallace
9de8fe483d Remove spare whitespace on blank lines. 2015-11-28 12:41:46 -05:00
Joseph Wallace
e4258bfad3 Don't wait for video keyframes on audio-only streams. 2015-11-28 12:41:46 -05:00
Joseph Wallace
9cf4ed560c Probe SimpleBlocks to determine which clusters start with a keyframe. 2015-11-28 12:41:45 -05:00
Joseph Wallace
6e11db5de2 Probe Tracks section of header to identify the video track.
We'll sync keyframes on that track next commit.
2015-11-28 12:41:45 -05:00
Joseph Wallace
9899413839 Add parser for bodies of Integer elements. 2015-11-28 12:41:45 -05:00
Joseph Wallace
f461ff6763 Buffer clusters to have time to probe them for metadata, like keyframes. 2015-11-28 12:41:45 -05:00
Joseph Wallace
def5a4cf6c Implement EBML-aware parser.
* Loop over elements in input buffer.
* Most are literally copied with their contents without
  inspection into the header or data buffers as appropriate.
* Some only copy the element header, to allow inspecting
  children elements.
* Cluster elements are identified and used as sync points.

No probing is done for keyframes *yet*
2015-11-28 12:41:45 -05:00
Joseph Wallace
50c4984c78 Add functions to comprehend EBML tags. 2015-11-28 12:41:45 -05:00
Joseph Wallace
531d060d16 Adjust EBML parser writing protocol.
This will allow leaving unparsed data in the input buffer to wait for completion.
2015-11-28 12:41:45 -05:00
Joseph Wallace
13dc880d29 Yield sync point status from ebml_read directly.
This simplifies some fragile "was the last chunk a sync point?" logic.
2015-11-28 12:41:45 -05:00
Joseph Wallace
744b66c40e Make the state-machine nature of the EBML parser more evident. 2015-11-28 12:41:45 -05:00
Joseph Wallace
15e7fc6e4a Add comments & braces to format_ebml.c.
This should help make future changes to the code clearer.
2015-11-28 12:41:45 -05:00
Philipp Schafft
85b709da04 Merge branch 'matchfile' 2015-11-23 13:01:23 +00:00
Philipp Schafft
752b2f90fe Cleanup: mark constant loopup tables read only 2015-11-23 12:47:56 +00:00
Philipp Schafft
a650965cfd Cleanup: make util_base64_encode() useful for binary data. 2015-11-23 12:47:47 +00:00
Philipp Schafft
de48bdd13f Cleanup: Removed unused member host vom connection struct 2015-11-23 11:44:14 +00:00
Philipp Schafft
69cf9ad6c2 added <errno.h> as we use errno 2015-11-23 11:41:25 +00:00
Philipp Schafft
b7d0188e1d Update: updated submodules 2015-11-22 18:52:15 +00:00
Philipp Schafft
c0e895404e Cleanup: mark key as const (why wasn't it const already?) 2015-11-22 18:47:11 +00:00
Philipp Schafft
b55bae035d Update: Improved matchfile API
This adds support for allow-deny kind of rules with the matchfile API.

See: #2119
2015-11-22 18:47:06 +00:00
Philipp Schafft
d24dda61d0 Cleanup: moved ban and allow file support into generic implementation
ban and allow file support has been moved into a generic implementation
that can be re-used by later code such as proxy matching or other
blacklisting.
See: #1959
2015-11-22 18:47:00 +00:00
Philipp Schafft
3653a1f812 updated submodules 2015-11-19 10:47:08 +00:00
Philipp Schafft
8e2fe8a3f7 Fix: Handle mount=NULL in config_find_mount() correctly. 2015-11-11 12:18:15 +00:00
Philipp Schafft
1653d7489a Fix: corrected comment about <shoutcast-mount>
When unset no default is used but the feature is disabled.
(The Shoutcast listen socket is not opened at all.)

Thanks to Jeremiah Rogers for pointing out.
2015-09-10 14:53:44 +00:00
Marvin Scholz
ae83ea8705 Fix two mistakes in the default config's comments 2015-08-31 22:31:31 +02:00
Philipp Schafft
f5d728d730 Fix: Include required headers 2015-08-10 08:54:21 +00:00
Marvin Scholz
16dac2505e Fix that global listener count could be negative under certain circumstances
This fixes a bug that could cause the global listener count of Icecast to
be negative. This was caused due to wrong handling of errors in the
format_prepare_headers function.

Fixes: #2199

Thanks a lot to Simeon Völkel (0xBD4E031CDB4043C9) for reporting
and investigating the bug.
2015-06-06 14:09:44 +02:00
Marvin Scholz
c35760cd50 Fix possible segfaults when header allocation fails
This fixes some possible segfaults that could happen if the header
(re)allocation fails.
2015-06-06 14:09:44 +02:00
Thomas B. Ruecker
2b9440d671 Clarify spelling, shamelessly lifted from Mailman3
Also adjust formatting a bit, kill some trailing spaces.
2015-05-25 13:12:08 +00:00
Thomas B. Ruecker
56bbc0d12c Fix issue with only "-" and whitespace in element
Fixes: #2198

If there is a single "-" or it is only accompanied by whitespace, then
it wouldn't get escaped as it was detected as as a number. This would
produce invalid JSON.
This makes the numbers part ignore such and thus ensures it gets escaped
as text.

There might be other corner cases related to number parsing, this should be investigated.
2015-05-25 12:56:45 +00:00
Thomas B. Ruecker
0b1ac3e9d5 Essential part of upstream pull req No. 20
https://github.com/doekman/xml2json-xslt/pull/20

 Some numeric values would not get formatted to valid JSON. This
 incorporates the suggestions from issue #15.

Also fixed whitespace of original patch.
Additional fix for related issue will follow.
2015-05-25 12:56:45 +00:00
Philipp Schafft
3d2ab9aec2 Fix: Handle case realloc() is used as free().
This (hopefully) corrects the usage of realloc() as free().
This patch is part of the series based on Denis Denisov's input.
2015-04-08 13:05:10 +00:00
Philipp Schafft
6605f4ddaa Fix: Let util_url_escape() handle NULL parameter.
This let util_url_escape() handle NULL passed as parameter.
In case the parameter is NULL it will also return NULL.

This patch also does some cleanup of the code such as migration
away from int and thus avoiding future failtures.

This is a re-apply of 3baa4e46aa
as git refuses to cherry-pick.
2015-04-08 10:25:25 +00:00
Philipp Schafft
c1f0eaff8a Fix: Fixed some smaller bugs such as leaks and performance improvements.
This is a first commit to correct minor problmes reported by
Denis Denisov. There is likely another commit to correct some more
such problems.

Thank you Denis Denisov.
2015-04-08 09:36:59 +00:00
Philipp Schafft
7402383448 Cleanup: move libcurl specifc code into curl.c
This cleans the libcurl usage up a bit. It moves common code used
to interact with libcurl into a single new file curl.[ch].

Notes:
* It does not alter any features nor fixes any bugs.
* Thew REVIEW about strdup(self->url) in event_url.c as been processed.
  According to the manpage for curl_easy_setopt()/CURLOPT_URL
  there is no need for us to copy.
* URL Auth as well as URL triggers have sent ICECAST_VERSION_STRING
  as User-Agent:, this has be corrected to what is set in the config
  file.
* As curl.c is now a single point for setting parameters all the TLS
  parameters should be reviewed and set (based on config).

Please test!
2015-04-08 07:44:36 +00:00
Philipp Schafft
a1f204c184 Cleanup: Renamed <kartoffelsalat> to <event-bindings>
The parent element for <event> was renamed from <kartoffelsalat>
to <event-bindings> as discussed on the mailinglist and on IRC.
2015-03-31 08:20:37 +00:00
Philipp Schafft
2661d4360e Cleanup: More space corrections 2015-03-31 08:14:42 +00:00
Philipp Schafft
8455dbde57 Cleanup: corrected a space 2015-03-31 08:03:28 +00:00
Philipp Schafft
bfbb8f207c Feature: playlist history for ICY based streams.
This patch adds support for history for ICY based streams.
Of cause this has the same limits for metedata as ICY has.

See: #766
2015-03-28 18:14:41 +00:00
Philipp Schafft
961453b0de Added config option for history size.
This adds a <max-history> config option to the <mount> section.
Default is a history size of 4.

See: #766
2015-03-28 17:34:35 +00:00
Philipp Schafft
06fe442c2d Fixed off-by-one error in playlist truncation.
The playlist truncation (may_tracks) was off by one.
This fixes the problem.
2015-03-28 17:33:09 +00:00