mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
RTSP: support reading hex and skiping
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
This commit is contained in:
parent
c6334a7509
commit
ca07b34f3b
2 changed files with 14 additions and 0 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;
|
||||
|
|
|
@ -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