~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavformat/rtpenc_chain.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    AVFormatContext *rtpctx;
32
32
    int ret;
33
33
    AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
 
34
    uint8_t *rtpflags;
 
35
    AVDictionary *opts = NULL;
34
36
 
35
37
    if (!rtp_format)
36
38
        return NULL;
41
43
        return NULL;
42
44
 
43
45
    rtpctx->oformat = rtp_format;
44
 
    if (!av_new_stream(rtpctx, 0)) {
 
46
    if (!avformat_new_stream(rtpctx, NULL)) {
45
47
        av_free(rtpctx);
46
48
        return NULL;
47
49
    }
 
50
    /* Pass the interrupt callback on */
 
51
    rtpctx->interrupt_callback = s->interrupt_callback;
48
52
    /* Copy the max delay setting; the rtp muxer reads this. */
49
53
    rtpctx->max_delay = s->max_delay;
50
54
    /* Copy other stream parameters. */
51
55
    rtpctx->streams[0]->sample_aspect_ratio = st->sample_aspect_ratio;
52
56
 
53
 
    av_set_parameters(rtpctx, NULL);
54
 
    /* Copy the rtpflags values straight through */
55
 
    if (s->oformat->priv_class &&
56
 
        av_find_opt(s->priv_data, "rtpflags", NULL, 0, 0))
57
 
        av_set_int(rtpctx->priv_data, "rtpflags",
58
 
                   av_get_int(s->priv_data, "rtpflags", NULL));
 
57
    if (av_opt_get(s, "rtpflags", AV_OPT_SEARCH_CHILDREN, &rtpflags) >= 0)
 
58
        av_dict_set(&opts, "rtpflags", rtpflags, AV_DICT_DONT_STRDUP_VAL);
59
59
 
60
60
    /* Set the synchronized start time. */
61
61
    rtpctx->start_time_realtime = s->start_time_realtime;
66
66
        ffio_fdopen(&rtpctx->pb, handle);
67
67
    } else
68
68
        ffio_open_dyn_packet_buf(&rtpctx->pb, packet_size);
69
 
    ret = avformat_write_header(rtpctx, NULL);
 
69
    ret = avformat_write_header(rtpctx, &opts);
 
70
    av_dict_free(&opts);
70
71
 
71
72
    if (ret) {
72
73
        if (handle) {