summaryrefslogtreecommitdiff
path: root/libavformat/rtp.c
diff options
context:
space:
mode:
authorFrançois Revol <revol@free.fr>2006-03-01 22:45:27 +0000
committerFrançois Revol <revol@free.fr>2006-03-01 22:45:27 +0000
commit7581c5f50c6aab556a82e4a07c7a209053afd0a3 (patch)
treef30c649b2a1f4ab5c65b2e5407110c8f47701413 /libavformat/rtp.c
parente01dc227f391937c4e73a0f494a4e0130dcd25c4 (diff)
fix debug code: do not try to take st->codec if st is NULL. This makes ffplay give me pics from FreeBoxTV \o/
Originally committed as revision 5090 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtp.c')
-rw-r--r--libavformat/rtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index 00230010fa..eeb455faa7 100644
--- a/libavformat/rtp.c
+++ b/libavformat/rtp.c
@@ -402,9 +402,11 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
/* NOTE: we can handle only one payload type */
if (s->payload_type != payload_type)
return -1;
+
+ st = s->st;
#if defined(DEBUG) || 1
if (seq != ((s->seq + 1) & 0xffff)) {
- av_log(s->st->codec, AV_LOG_ERROR, "RTP: PT=%02x: bad cseq %04x expected=%04x\n",
+ av_log(st?st->codec:NULL, AV_LOG_ERROR, "RTP: PT=%02x: bad cseq %04x expected=%04x\n",
payload_type, seq, ((s->seq + 1) & 0xffff));
}
#endif
@@ -412,7 +414,6 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
len -= 12;
buf += 12;
- st = s->st;
if (!st) {
/* specific MPEG2TS demux support */
ret = mpegts_parse_packet(s->ts, pkt, buf, len);