~ubuntu-branches/ubuntu/trusty/gst-libav1.0/trusty-proposed

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libavformat/rtpdec_asf.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-09-24 17:07:00 UTC
  • mfrom: (1.1.17) (7.1.9 experimental)
  • Revision ID: package-import@ubuntu.com-20130924170700-4dg62s3pwl0pdakz
Tags: 1.2.0-1
* New upstream stable release:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.2.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
    if (av_strstart(p, "pgmpu:data:application/vnd.ms.wms-hdr.asfv1;base64,", &p)) {
100
100
        AVIOContext pb;
101
101
        RTSPState *rt = s->priv_data;
 
102
        AVDictionary *opts = NULL;
102
103
        int len = strlen(p) * 6 / 8;
103
104
        char *buf = av_mallocz(len);
104
105
        av_base64_decode(buf, p, len);
113
114
        if (!(rt->asf_ctx = avformat_alloc_context()))
114
115
            return AVERROR(ENOMEM);
115
116
        rt->asf_ctx->pb      = &pb;
116
 
        ret = avformat_open_input(&rt->asf_ctx, "", &ff_asf_demuxer, NULL);
 
117
        av_dict_set(&opts, "no_resync_search", "1", 0);
 
118
        ret = avformat_open_input(&rt->asf_ctx, "", &ff_asf_demuxer, &opts);
 
119
        av_dict_free(&opts);
117
120
        if (ret < 0)
118
121
            return ret;
119
122
        av_dict_copy(&s->metadata, rt->asf_ctx->metadata, 0);
127
130
static int asfrtp_parse_sdp_line(AVFormatContext *s, int stream_index,
128
131
                                 PayloadContext *asf, const char *line)
129
132
{
 
133
    if (stream_index < 0)
 
134
        return 0;
130
135
    if (av_strstart(line, "stream:", &line)) {
131
136
        RTSPState *rt = s->priv_data;
132
137
 
163
168
static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf,
164
169
                               AVStream *st, AVPacket *pkt,
165
170
                               uint32_t *timestamp,
166
 
                               const uint8_t *buf, int len, int flags)
 
171
                               const uint8_t *buf, int len, uint16_t seq,
 
172
                               int flags)
167
173
{
168
174
    AVIOContext *pb = &asf->pb;
169
175
    int res, mflags, len_off;
256
262
    for (;;) {
257
263
        int i;
258
264
 
259
 
        res = av_read_packet(rt->asf_ctx, pkt);
 
265
        res = ff_read_packet(rt->asf_ctx, pkt);
260
266
        rt->asf_pb_pos = avio_tell(pb);
261
267
        if (res != 0)
262
268
            break;
293
299
RTPDynamicProtocolHandler ff_ms_rtp_ ## n ## _handler = { \
294
300
    .enc_name         = s, \
295
301
    .codec_type       = t, \
296
 
    .codec_id         = CODEC_ID_NONE, \
 
302
    .codec_id         = AV_CODEC_ID_NONE, \
297
303
    .parse_sdp_a_line = asfrtp_parse_sdp_line, \
298
304
    .alloc            = asfrtp_new_context, \
299
305
    .free             = asfrtp_free_context, \