~ubuntu-branches/ubuntu/lucid/ffmpeg/lucid-security

« back to all changes in this revision

Viewing changes to libavformat/rtpdec.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-03-13 09:18:28 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090313091828-n4ktby5eca487uhv
Tags: 3:0.svn20090303-1ubuntu1+unstripped1
merge from ubuntu.jaunty branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <unistd.h>
30
30
#include "network.h"
31
31
 
32
 
#include "rtp.h"
 
32
#include "rtpdec.h"
33
33
#include "rtp_h264.h"
34
34
 
35
35
//#define DEBUG
407
407
        /* return the next packets, if any */
408
408
        if(s->st && s->parse_packet) {
409
409
            timestamp= 0; ///< Should not be used if buf is NULL, but should be set to the timestamp of the packet returned....
410
 
            rv= s->parse_packet(s->dynamic_protocol_context,
 
410
            rv= s->parse_packet(s->ic, s->dynamic_protocol_context,
411
411
                                s->st, pkt, &timestamp, NULL, 0, flags);
412
412
            finalize_packet(s, pkt, timestamp);
413
413
            return rv;
437
437
        return -1;
438
438
    }
439
439
    payload_type = buf[1] & 0x7f;
 
440
    if (buf[1] & 0x80)
 
441
        flags |= RTP_FLAG_MARKER;
440
442
    seq  = AV_RB16(buf + 2);
441
443
    timestamp = AV_RB32(buf + 4);
442
444
    ssrc = AV_RB32(buf + 8);
472
474
            return 1;
473
475
        }
474
476
    } else if (s->parse_packet) {
475
 
        rv = s->parse_packet(s->dynamic_protocol_context,
 
477
        rv = s->parse_packet(s->ic, s->dynamic_protocol_context,
476
478
                             s->st, pkt, &timestamp, buf, len, flags);
477
479
    } else {
478
480
        // at this point, the RTP header has been stripped;  This is ASSUMING that there is only 1 CSRC, which in't wise.