Commit 596f81c7 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'fe208ca5'

* commit 'fe208ca5':
  rtpdec_hevc: Skip 1 byte (DOND) instead of 2 (DONL) between aggregation units

Conflicts:
	libavformat/rtpdec_hevc.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 34a8de86 fe208ca5
...@@ -181,7 +181,7 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s, ...@@ -181,7 +181,7 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, PayloadContext *data, AVPacket *pkt, int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, PayloadContext *data, AVPacket *pkt,
const uint8_t *buf, int len, const uint8_t *buf, int len,
int start_skip, int *nal_counters, int skip_between, int *nal_counters,
int nal_mask) int nal_mask)
{ {
int pass = 0; int pass = 0;
...@@ -194,9 +194,6 @@ int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, PayloadContext *data, ...@@ -194,9 +194,6 @@ int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, PayloadContext *data,
const uint8_t *src = buf; const uint8_t *src = buf;
int src_len = len; int src_len = len;
src += start_skip;
src_len -= start_skip;
while (src_len > 2) { while (src_len > 2) {
uint16_t nal_size = AV_RB16(src); uint16_t nal_size = AV_RB16(src);
...@@ -224,8 +221,8 @@ int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, PayloadContext *data, ...@@ -224,8 +221,8 @@ int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, PayloadContext *data,
} }
// eat what we handled // eat what we handled
src += nal_size + start_skip; src += nal_size + skip_between;
src_len -= nal_size + start_skip; src_len -= nal_size + skip_between;
} }
if (pass == 0) { if (pass == 0) {
......
...@@ -321,9 +321,15 @@ static int hevc_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_hevc_ctx ...@@ -321,9 +321,15 @@ static int hevc_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_hevc_ctx
buf += RTP_HEVC_PAYLOAD_HEADER_SIZE; buf += RTP_HEVC_PAYLOAD_HEADER_SIZE;
len -= RTP_HEVC_PAYLOAD_HEADER_SIZE; len -= RTP_HEVC_PAYLOAD_HEADER_SIZE;
/* pass the HEVC DONL field */
if (rtp_hevc_ctx->using_donl_field) {
buf += RTP_HEVC_DONL_FIELD_SIZE;
len -= RTP_HEVC_DONL_FIELD_SIZE;
}
res = ff_h264_handle_aggregated_packet(ctx, rtp_hevc_ctx, pkt, buf, len, res = ff_h264_handle_aggregated_packet(ctx, rtp_hevc_ctx, pkt, buf, len,
rtp_hevc_ctx->using_donl_field ? rtp_hevc_ctx->using_donl_field ?
RTP_HEVC_DONL_FIELD_SIZE : 0, RTP_HEVC_DOND_FIELD_SIZE : 0,
NULL, 0); NULL, 0);
if (res < 0) if (res < 0)
return res; return res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment