mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Fix: Actually use the correct name for the function
This commit is contained in:
parent
595179a248
commit
7108aab18b
@ -51,7 +51,7 @@ static void __handle_header_opushead(ogg_state_t *ogg_info, ogg_packet *packet)
|
|||||||
}
|
}
|
||||||
|
|
||||||
stats_event_args(ogg_info->mount, "audio_channels", "%ld", (long int)packet->packet[9]);
|
stats_event_args(ogg_info->mount, "audio_channels", "%ld", (long int)packet->packet[9]);
|
||||||
stats_event_args(ogg_info->mount, "audio_samplerate", "%ld", (long int)metadata_xiph_read_u32be_unaligned(packet->packet+12));
|
stats_event_args(ogg_info->mount, "audio_samplerate", "%ld", (long int)metadata_xiph_read_u32le_unaligned(packet->packet+12));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __handle_header_opustags(ogg_state_t *ogg_info, ogg_packet *packet, format_plugin_t *plugin)
|
static void __handle_header_opustags(ogg_state_t *ogg_info, ogg_packet *packet, format_plugin_t *plugin)
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
#define CATMODULE "metadata-xiph"
|
#define CATMODULE "metadata-xiph"
|
||||||
|
|
||||||
uint32_t metadata_xiph_read_u32be_unaligned(const unsigned char *in)
|
uint32_t metadata_xiph_read_u32le_unaligned(const unsigned char *in)
|
||||||
{
|
{
|
||||||
uint32_t ret = 0;
|
uint32_t ret = 0;
|
||||||
ret += in[3];
|
ret += in[3];
|
||||||
@ -45,7 +45,7 @@ bool metadata_xiph_read_vorbis_comments(vorbis_comment *vc, const void *buff
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* reading vendor tag and discarding it */
|
/* reading vendor tag and discarding it */
|
||||||
vendor_len = metadata_xiph_read_u32be_unaligned(buffer);
|
vendor_len = metadata_xiph_read_u32le_unaligned(buffer);
|
||||||
expected_len += vendor_len;
|
expected_len += vendor_len;
|
||||||
|
|
||||||
if (len < expected_len)
|
if (len < expected_len)
|
||||||
@ -53,7 +53,7 @@ bool metadata_xiph_read_vorbis_comments(vorbis_comment *vc, const void *buff
|
|||||||
|
|
||||||
buffer += 4 + vendor_len;
|
buffer += 4 + vendor_len;
|
||||||
|
|
||||||
count = metadata_xiph_read_u32be_unaligned(buffer);
|
count = metadata_xiph_read_u32le_unaligned(buffer);
|
||||||
|
|
||||||
expected_len += count * 4;
|
expected_len += count * 4;
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ bool metadata_xiph_read_vorbis_comments(vorbis_comment *vc, const void *buff
|
|||||||
buffer += 4;
|
buffer += 4;
|
||||||
|
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
uint32_t comment_len = metadata_xiph_read_u32be_unaligned(buffer);
|
uint32_t comment_len = metadata_xiph_read_u32le_unaligned(buffer);
|
||||||
|
|
||||||
buffer += 4;
|
buffer += 4;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include <vorbis/codec.h>
|
#include <vorbis/codec.h>
|
||||||
|
|
||||||
uint32_t metadata_xiph_read_u32be_unaligned(const unsigned char *in);
|
uint32_t metadata_xiph_read_u32le_unaligned(const unsigned char *in);
|
||||||
|
|
||||||
/* returns true if parsing was successful, *vc must be in inited state before and will be in inited state after (even when false is returned) */
|
/* returns true if parsing was successful, *vc must be in inited state before and will be in inited state after (even when false is returned) */
|
||||||
bool metadata_xiph_read_vorbis_comments(vorbis_comment *vc, const void *buffer, size_t len);
|
bool metadata_xiph_read_vorbis_comments(vorbis_comment *vc, const void *buffer, size_t len);
|
||||||
|
Loading…
Reference in New Issue
Block a user