Code Coverage Report for src/api/open-packet.c


Hit Total Coverage
Lines: 3 3 100.0%
Branches: 0 0 -----

1 /*
2 * libnogg: a decoder library for Ogg Vorbis streams
3 * Copyright (c) 2014-2024 Andrew Church <achurch@achurch.org>
4 *
5 * This software may be copied and redistributed under certain conditions;
6 * see the file "COPYING" in the source code distribution for details.
7 * NO WARRANTY is provided with this software.
8 */
9
10 #include "include/nogg.h"
11 #include "src/common.h"
12 #include "src/util/open.h"
13
14 #include <stdlib.h>
15 #include <string.h>
16
17 /*************************************************************************/
18 /*************************** Interface routine ***************************/
19 /*************************************************************************/
20
21 vorbis_t *vorbis_open_packet(
22 const void *id_packet, int32_t id_packet_len,
23 const void *setup_packet, int32_t setup_packet_len,
24 vorbis_callbacks_t callbacks, void *opaque,
25 unsigned int options, vorbis_error_t *error_ret)
26 {
27 return open_common(
28 &(open_params_t){.callbacks = &callbacks,
29 .callback_data = opaque,
30 .options = options,
31 .packet_mode = true,
32 .id_packet = id_packet,
33 .id_packet_len = id_packet_len,
34 .setup_packet = setup_packet,
35 .setup_packet_len = setup_packet_len},
36 error_ret);
37 }
38
39 /*************************************************************************/
40 /*************************************************************************/