summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2009-03-03 13:41:50 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2009-03-03 13:41:50 +0000
commitf3e71942e77fa8dcea62f9e4eebbbbdfbf062b61 (patch)
treeb827b68005fd59a4263f6d644bde4aab37ae910b /libavformat/rtpdec.c
parent2db272e93e8c0c0d5c7c193c85906edb6be54dd6 (diff)
In the current implementation of rtp_parse_packet(), finalize_packet() is
called for all packets with an internal handler function but only for non-first packets from dynamic payload parse_packet() handlers. This patch fixes that. Bug was noticed by Luca in "[PATCH] rtpdec.c: don't overwrite pkt->stream_index in finalize_packet()" thread. Originally committed as revision 17764 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r--libavformat/rtpdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 3e833a1822..764385dd27 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -473,6 +473,7 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
s->read_buf_index = 0;
return 1;
}
+ return 0;
} else if (s->parse_packet) {
rv = s->parse_packet(s->ic, s->dynamic_protocol_context,
s->st, pkt, &timestamp, buf, len, flags);
@@ -535,10 +536,11 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
memcpy(pkt->data, buf, len);
break;
}
+ }
// now perform timestamp things....
finalize_packet(s, pkt, timestamp);
- }
+
return rv;
}