~ubuntu-dev/mplayer/ubuntu-feisty

« back to all changes in this revision

Viewing changes to libavformat/rtp.c

  • Committer: Reinhard Tartler
  • Date: 2006-07-08 08:47:54 UTC
  • Revision ID: siretart@tauware.de-20060708084754-c3ff228cc9c2d8de
upgrade to pre8

Show diffs side-by-side

added added

removed removed

Lines of Context:
402
402
    /* NOTE: we can handle only one payload type */
403
403
    if (s->payload_type != payload_type)
404
404
        return -1;
 
405
 
 
406
    st = s->st;
405
407
#if defined(DEBUG) || 1
406
408
    if (seq != ((s->seq + 1) & 0xffff)) {
407
 
        av_log(s->st->codec, AV_LOG_ERROR, "RTP: PT=%02x: bad cseq %04x expected=%04x\n",
 
409
        av_log(st?st->codec:NULL, AV_LOG_ERROR, "RTP: PT=%02x: bad cseq %04x expected=%04x\n",
408
410
               payload_type, seq, ((s->seq + 1) & 0xffff));
409
411
    }
410
412
#endif
412
414
    len -= 12;
413
415
    buf += 12;
414
416
 
415
 
    st = s->st;
416
417
    if (!st) {
417
418
        /* specific MPEG2TS demux support */
418
419
        ret = mpegts_parse_packet(s->ts, pkt, buf, len);
531
532
        payload_type = RTP_PT_PRIVATE; /* private payload type */
532
533
    s->payload_type = payload_type;
533
534
 
534
 
    s->base_timestamp = random();
 
535
// following 2 FIXMies could be set based on the current time, theres normaly no info leak, as rtp will likely be transmitted immedeatly
 
536
    s->base_timestamp = 0; /* FIXME: was random(), what should this be? */
535
537
    s->timestamp = s->base_timestamp;
536
 
    s->ssrc = random();
 
538
    s->ssrc = 0; /* FIXME: was random(), what should this be? */
537
539
    s->first_packet = 1;
538
540
 
539
541
    max_packet_size = url_fget_max_packet_size(&s1->pb);