summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandrew-elder <aelder@audioscience.com>2018-10-24 10:40:48 -0400
committerGitHub <noreply@github.com>2018-10-24 10:40:48 -0400
commitbe18de3c429589ea69634d30f0ad23dfda619de6 (patch)
tree62a6dec473ab3cc1ab2a99cd34d59c180188886b
parentf9991ab6b9e9448fce61751b4483d7eebbf03804 (diff)
parent2f88ee2072e03752f6d782bd04e9696b2c9fd17b (diff)
downloadOpen-AVB-be18de3c429589ea69634d30f0ad23dfda619de6.tar.gz
Merge pull request #841 from yesbman/master
Add h264_timestamp size into the H264 data length, remove it from theā€¦
-rw-r--r--lib/avtp_pipeline/map_h264/openavb_map_h264.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/avtp_pipeline/map_h264/openavb_map_h264.c b/lib/avtp_pipeline/map_h264/openavb_map_h264.c
index 6c2557f7..70c9a846 100644
--- a/lib/avtp_pipeline/map_h264/openavb_map_h264.c
+++ b/lib/avtp_pipeline/map_h264/openavb_map_h264.c
@@ -112,6 +112,9 @@ https://github.com/benhoyt/inih/commit/74d2ca064fb293bc60a77b0bd068075b293cf175.
// - 4 bytes h264_timestamp
#define HIDX_H264_TIMESTAMP32 24
+// - 4 bytes h264_timestamp size
+#define HIDX_H264_TIMESTAMP_SIZE 4
+
typedef struct {
/////////////
// Config data
@@ -314,7 +317,8 @@ tx_cb_ret_t openavbMapH264TxCB(media_q_t *pMediaQ, U8 *pData, U32 *dataLen)
// Copy the h264 rtp payload into the outgoing avtp packet.
memcpy(pPayload, pMediaQItem->pPubData, pMediaQItem->dataLen);
- *(U16 *)(&pHdr[HIDX_STREAM_DATA_LEN16]) = htons(pMediaQItem->dataLen);
+ // Add h264_timestamp size into the H264 data length
+ *(U16 *)(&pHdr[HIDX_STREAM_DATA_LEN16]) = htons(pMediaQItem->dataLen + HIDX_H264_TIMESTAMP_SIZE);
// Set out bound data length (entire packet length)
*dataLen = pMediaQItem->dataLen + TOTAL_HEADER_SIZE;