~ubuntu-branches/ubuntu/trusty/libav/trusty-proposed

« back to all changes in this revision

Viewing changes to libavformat/rdt.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2013-10-22 23:24:08 UTC
  • mfrom: (1.3.36 sid)
  • Revision ID: package-import@ubuntu.com-20131022232408-b8tvvn4pyzri9mi3
Tags: 6:9.10-1ubuntu1
* Build all -extra flavors from this source package, as libav got demoted
  from main to universe, cf LP: #1243235
* Simplify debian/rules to follow exactly the code that debian executes
* New upstream (LP: #1180288) fixes lots of security issues (LP: #1242802)
* Merge from unstable, remaining changes:
  - build-depend on libtiff5-dev rather than libtiff4-dev,
    avoids FTBFS caused by imlib
  - follow the regular debian codepaths

Show diffs side-by-side

added added

removed removed

Lines of Context:
293
293
static int
294
294
rdt_parse_packet (AVFormatContext *ctx, PayloadContext *rdt, AVStream *st,
295
295
                  AVPacket *pkt, uint32_t *timestamp,
296
 
                  const uint8_t *buf, int len, int flags)
 
296
                  const uint8_t *buf, int len, uint16_t rtp_seq, int flags)
297
297
{
298
298
    int seq = 1, res;
299
299
    AVIOContext pb;
309
309
        if (res < 0)
310
310
            return res;
311
311
        if (res > 0) {
312
 
            if (st->codec->codec_id == CODEC_ID_AAC) {
 
312
            if (st->codec->codec_id == AV_CODEC_ID_AAC) {
313
313
                memcpy (rdt->buffer, buf + pos, len - pos);
314
314
                rdt->rmctx->pb = avio_alloc_context (rdt->buffer, len - pos, 0,
315
315
                                                    NULL, NULL, NULL, NULL);
322
322
            ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb,
323
323
                                  st, rdt->rmst[st->index], pkt);
324
324
        if (rdt->audio_pkt_cnt == 0 &&
325
 
            st->codec->codec_id == CODEC_ID_AAC)
 
325
            st->codec->codec_id == AV_CODEC_ID_AAC)
326
326
            av_freep(&rdt->rmctx->pb);
327
327
    }
328
328
    pkt->stream_index = st->index;
348
348
        timestamp= 0; ///< Should not be used if buf is NULL, but should be set to the timestamp of the packet returned....
349
349
        rv= s->parse_packet(s->ic, s->dynamic_protocol_context,
350
350
                            s->streams[s->prev_stream_id],
351
 
                            pkt, &timestamp, NULL, 0, flags);
 
351
                            pkt, &timestamp, NULL, 0, 0, flags);
352
352
        return rv;
353
353
    }
354
354
 
375
375
 
376
376
    rv = s->parse_packet(s->ic, s->dynamic_protocol_context,
377
377
                         s->streams[s->prev_stream_id],
378
 
                         pkt, &timestamp, buf, len, flags);
 
378
                         pkt, &timestamp, buf, len, 0, flags);
379
379
 
380
380
    return rv;
381
381
}
432
432
                }
433
433
                rdt->rmst[s->streams[n]->index] = ff_rm_alloc_rmstream();
434
434
                rdt_load_mdpr(rdt, s->streams[n], (n - first) * 2);
435
 
 
436
 
                if (s->streams[n]->codec->codec_id == CODEC_ID_AAC)
437
 
                    s->streams[n]->codec->frame_size = 1; // FIXME
438
435
           }
439
436
    }
440
437
 
554
551
static RTPDynamicProtocolHandler ff_rdt_ ## n ## _handler = { \
555
552
    .enc_name         = s, \
556
553
    .codec_type       = t, \
557
 
    .codec_id         = CODEC_ID_NONE, \
 
554
    .codec_id         = AV_CODEC_ID_NONE, \
558
555
    .parse_sdp_a_line = rdt_parse_sdp_line, \
559
556
    .alloc            = rdt_new_context, \
560
557
    .free             = rdt_free_context, \