Skip to content

Commit

Permalink
Merge pull request Avnu#841 from yesbman/master
Browse files Browse the repository at this point in the history
Add h264_timestamp size into the H264 data length, remove it from the…
  • Loading branch information
andrew-elder authored Oct 24, 2018
2 parents f9991ab + 2f88ee2 commit be18de3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/avtp_pipeline/map_h264/openavb_map_h264.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ Complete license and copyright information can be found at
// - 4 bytes h264_timestamp
#define HIDX_H264_TIMESTAMP32 24

// - 4 bytes h264_timestamp size
#define HIDX_H264_TIMESTAMP_SIZE 4

typedef struct {
/////////////
// Config data
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit be18de3

Please sign in to comment.