Mercurial > libavformat.hg
comparison rtpenc.c @ 5477:2ba624c6c869 libavformat
Remove an unneeded local variable.
author | lucabe |
---|---|
date | Mon, 28 Dec 2009 13:19:54 +0000 |
parents | 770a7de45356 |
children | c75f52005f22 |
comparison
equal
deleted
inserted
replaced
5476:770a7de45356 | 5477:2ba624c6c869 |
---|---|
69 } | 69 } |
70 | 70 |
71 static int rtp_write_header(AVFormatContext *s1) | 71 static int rtp_write_header(AVFormatContext *s1) |
72 { | 72 { |
73 RTPMuxContext *s = s1->priv_data; | 73 RTPMuxContext *s = s1->priv_data; |
74 int payload_type, max_packet_size, n; | 74 int max_packet_size, n; |
75 AVStream *st; | 75 AVStream *st; |
76 | 76 |
77 if (s1->nb_streams != 1) | 77 if (s1->nb_streams != 1) |
78 return -1; | 78 return -1; |
79 st = s1->streams[0]; | 79 st = s1->streams[0]; |
81 av_log(s1, AV_LOG_ERROR, "Unsupported codec %x\n", st->codec->codec_id); | 81 av_log(s1, AV_LOG_ERROR, "Unsupported codec %x\n", st->codec->codec_id); |
82 | 82 |
83 return -1; | 83 return -1; |
84 } | 84 } |
85 | 85 |
86 payload_type = ff_rtp_get_payload_type(st->codec); | 86 s->payload_type = ff_rtp_get_payload_type(st->codec); |
87 if (payload_type < 0) | 87 if (s->payload_type < 0) |
88 payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == CODEC_TYPE_AUDIO); | 88 s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == CODEC_TYPE_AUDIO); |
89 s->payload_type = payload_type; | |
90 | 89 |
91 // following 2 FIXMEs could be set based on the current time, there is normally no info leak, as RTP will likely be transmitted immediately | 90 // following 2 FIXMEs could be set based on the current time, there is normally no info leak, as RTP will likely be transmitted immediately |
92 s->base_timestamp = 0; /* FIXME: was random(), what should this be? */ | 91 s->base_timestamp = 0; /* FIXME: was random(), what should this be? */ |
93 s->timestamp = s->base_timestamp; | 92 s->timestamp = s->base_timestamp; |
94 s->cur_timestamp = 0; | 93 s->cur_timestamp = 0; |