Skip to content

Commit

Permalink
Fixing the RTSP DESCRIBE message when no audio is present
Browse files Browse the repository at this point in the history
  • Loading branch information
wberube committed Jul 10, 2024
1 parent 06beff3 commit 3dc590e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/hal/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ typedef enum {

typedef enum {
HAL_AUDCODEC_UNSPEC,
HAL_AUDCODEC_MP3 = 0x69
HAL_AUDCODEC_MP3 = 0x69,
HAL_AUDCODEC_NONE = 0xFF
} hal_audcodec;

typedef enum {
Expand Down
4 changes: 2 additions & 2 deletions src/rtsp/rtsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static void __method_describe(struct connection_item_t *p, rtsp_handle h)
char audioRtp[256] = "\r\n";
char audioRtpfmt[16];

if (h->audioPt) {
if (h->audioPt != 255) {
switch (h->audioPt) {
case 0:
sprintf(audioRtpfmt, "PCMU");
Expand Down Expand Up @@ -911,7 +911,7 @@ rtsp_handle rtsp_create(unsigned char max_con, int priority)

TALLOC(nh,return NULL);

nh->audioPt = -1;
nh->audioPt = 255;
nh->max_con = max_con;
nh->priority = priority;

Expand Down
2 changes: 1 addition & 1 deletion src/rtsp/rtsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ struct __rtsp_obj_t {
unsigned short port;
struct __time_stat_t stat;
char isH265;
char audioPt;
unsigned char audioPt;
mime_encoded_handle sprop_vps_b64;
mime_encoded_handle sprop_sps_b64;
mime_encoded_handle sprop_pps_b64;
Expand Down

0 comments on commit 3dc590e

Please sign in to comment.