mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
Merge branch 'agusakov'
This commit is contained in:
commit
640f731d44
18 changed files with 562 additions and 44 deletions
|
|
@ -1549,6 +1549,18 @@ int rtsp_message_readv_basic(struct rtsp_message *m,
|
|||
if (out_u32)
|
||||
*out_u32 = u32;
|
||||
|
||||
break;
|
||||
case RTSP_TYPE_HEX32:
|
||||
if (sscanf(entry, "%" SCNx32, &u32) != 1)
|
||||
return -EINVAL;
|
||||
|
||||
out_u32 = va_arg(*args, uint32_t*);
|
||||
if (out_u32)
|
||||
*out_u32 = u32;
|
||||
|
||||
break;
|
||||
case RTSP_TYPE_SKIP:
|
||||
/* just increment token */
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
|
@ -1588,8 +1600,13 @@ int rtsp_message_readv(struct rtsp_message *m,
|
|||
|
||||
for ( ; *types; ++types) {
|
||||
r = rtsp_message_readv_basic(m, *types, args);
|
||||
if (r < 0)
|
||||
if (r < 0) {
|
||||
if (m->iter_body)
|
||||
rtsp_message_exit_body(m);
|
||||
if (m->iter_header)
|
||||
rtsp_message_exit_header(m);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ enum {
|
|||
#define RTSP_TYPE_STRING 's'
|
||||
#define RTSP_TYPE_INT32 'i'
|
||||
#define RTSP_TYPE_UINT32 'u'
|
||||
#define RTSP_TYPE_HEX32 'h'
|
||||
#define RTSP_TYPE_SKIP '*'
|
||||
#define RTSP_TYPE_RAW '&'
|
||||
#define RTSP_TYPE_HEADER_START '<'
|
||||
#define RTSP_TYPE_HEADER_END '>'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue