From fe208ca54b0d3b6bbe1c660d371bb2cc6cf40ffc Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Sun, 22 Feb 2015 23:25:28 +0200 Subject: rtpdec_hevc: Skip 1 byte (DOND) instead of 2 (DONL) between aggregation units MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only the first aggregation unit has 2 bytes (DONL) prepended, if such a field is in use. Signed-off-by: Martin Storsjö --- libavformat/rtpdec_hevc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libavformat/rtpdec_hevc.c') diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c index 98701a6388..ac2346265a 100644 --- a/libavformat/rtpdec_hevc.c +++ b/libavformat/rtpdec_hevc.c @@ -317,9 +317,15 @@ static int hevc_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_hevc_ctx buf += 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, pkt, buf, len, rtp_hevc_ctx->using_donl_field ? - RTP_HEVC_DONL_FIELD_SIZE : 0, + RTP_HEVC_DOND_FIELD_SIZE : 0, NULL, 0); if (res < 0) return res; -- cgit v1.2.3