avformat/rtpdec_mpa_robust: fix commit 96084251e57d1738fde02a2b0d37ca609d9efd71
authorGilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Mon, 2 Mar 2015 10:00:16 +0000 (11:00 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 2 Mar 2015 10:58:42 +0000 (11:58 +0100)
Commit 96084251e57d1738fde02a2b0d37ca609d9efd71 introduced a change in
the parser implementation which broke it. Restore the original
implementation.

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rtpdec_mpa_robust.c

index 776e245..2439f9e 100644 (file)
@@ -98,7 +98,7 @@ static int mpa_robust_parse_packet(AVFormatContext *ctx, PayloadContext *data,
         pkt->stream_index = st->index;
         memcpy(pkt->data, buf, adu_size);
 
-        data->split_pos += adu_size;
+        data->split_pos = (buf - data->split_buf) + adu_size;
 
         if (data->split_pos == data->split_buf_size) {
             av_freep(&data->split_buf);