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

« back to all changes in this revision

Viewing changes to libavformat/rdt.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:
27
27
 
28
28
#include "avformat.h"
29
29
#include "libavutil/avstring.h"
30
 
#include "rtp.h"
 
30
#include "rtpdec.h"
31
31
#include "rdt.h"
32
32
#include "libavutil/base64.h"
33
33
#include "libavutil/md5.h"
295
295
 
296
296
/**< return 0 on packet, no more left, 1 on packet, 1 on partial packet... */
297
297
static int
298
 
rdt_parse_packet (PayloadContext *rdt, AVStream *st,
 
298
rdt_parse_packet (AVFormatContext *ctx, PayloadContext *rdt, AVStream *st,
299
299
                  AVPacket *pkt, uint32_t *timestamp,
300
300
                  const uint8_t *buf, int len, int flags)
301
301
{
306
306
        int pos;
307
307
 
308
308
        init_put_byte(&pb, buf, len, 0, NULL, NULL, NULL, NULL);
309
 
        flags = (flags & PKT_FLAG_KEY) ? 2 : 0;
 
309
        flags = (flags & RTP_FLAG_KEY) ? 2 : 0;
310
310
        res = ff_rm_parse_packet (rdt->rmctx, &pb, st, rdt->rmst[st->index], len, pkt,
311
311
                                  &seq, &flags, timestamp);
312
312
        pos = url_ftell(&pb);
347
347
    if (!buf && s->prev_stream_id != -1) {
348
348
        /* return the next packets, if any */
349
349
        timestamp= 0; ///< Should not be used if buf is NULL, but should be set to the timestamp of the packet returned....
350
 
        rv= s->parse_packet(s->dynamic_protocol_context,
 
350
        rv= s->parse_packet(s->ic, s->dynamic_protocol_context,
351
351
                            s->streams[s->prev_stream_id],
352
352
                            pkt, &timestamp, NULL, 0, flags);
353
353
        return rv;
361
361
    if (is_keyframe &&
362
362
        (set_id != s->prev_set_id || timestamp != s->prev_timestamp ||
363
363
         stream_id != s->prev_stream_id)) {
364
 
        flags |= PKT_FLAG_KEY;
 
364
        flags |= RTP_FLAG_KEY;
365
365
        s->prev_set_id    = set_id;
366
366
        s->prev_timestamp = timestamp;
367
367
    }
374
374
         return -1;
375
375
     }
376
376
 
377
 
    rv = s->parse_packet(s->dynamic_protocol_context,
 
377
    rv = s->parse_packet(s->ic, s->dynamic_protocol_context,
378
378
                         s->streams[s->prev_stream_id],
379
379
                         pkt, &timestamp, buf, len, flags);
380
380