aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtpdec_h264.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-02-22 23:25:28 +0200
committerMartin Storsjö <martin@martin.st>2015-02-23 15:33:20 +0200
commitfe208ca54b0d3b6bbe1c660d371bb2cc6cf40ffc (patch)
tree83355e5ca9250ec93606deba64c3a3d1eec9bd2b /libavformat/rtpdec_h264.c
parent35c6ce76b107225a19eb33aea38857d2405882af (diff)
downloadffmpeg-fe208ca54b0d3b6bbe1c660d371bb2cc6cf40ffc.tar.gz
rtpdec_hevc: Skip 1 byte (DOND) instead of 2 (DONL) between aggregation units
Only the first aggregation unit has 2 bytes (DONL) prepended, if such a field is in use. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_h264.c')
-rw-r--r--libavformat/rtpdec_h264.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index 9ee9f5e86d..ee1a993547 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -181,7 +181,7 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, AVPacket *pkt,
const uint8_t *buf, int len,
- int start_skip, int *nal_counters,
+ int skip_between, int *nal_counters,
int nal_mask)
{
int pass = 0;
@@ -194,9 +194,6 @@ int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, AVPacket *pkt,
const uint8_t *src = buf;
int src_len = len;
- src += start_skip;
- src_len -= start_skip;
-
while (src_len > 2) {
uint16_t nal_size = AV_RB16(src);
@@ -224,8 +221,8 @@ int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, AVPacket *pkt,
}
// eat what we handled
- src += nal_size + start_skip;
- src_len -= nal_size + start_skip;
+ src += nal_size + skip_between;
+ src_len -= nal_size + skip_between;
}
if (pass == 0) {