Mercurial > libavformat.hg
comparison rtpdec.c @ 5619:072cb3a1d4a7 libavformat
Fix warnings about implicit function declaration when compiling rtpdec.c
Patch by Alexis Ballier, alexis D ballier A gmail
author | cehoyos |
---|---|
date | Mon, 01 Feb 2010 23:10:04 +0000 |
parents | 96d885709963 |
children | 457efbf56d15 |
comparison
equal
deleted
inserted
replaced
5618:27fd77f20a89 | 5619:072cb3a1d4a7 |
---|---|
289 s->ic = s1; | 289 s->ic = s1; |
290 s->st = st; | 290 s->st = st; |
291 s->rtp_payload_data = rtp_payload_data; | 291 s->rtp_payload_data = rtp_payload_data; |
292 rtp_init_statistics(&s->statistics, 0); // do we know the initial sequence from sdp? | 292 rtp_init_statistics(&s->statistics, 0); // do we know the initial sequence from sdp? |
293 if (!strcmp(ff_rtp_enc_name(payload_type), "MP2T")) { | 293 if (!strcmp(ff_rtp_enc_name(payload_type), "MP2T")) { |
294 s->ts = mpegts_parse_open(s->ic); | 294 s->ts = ff_mpegts_parse_open(s->ic); |
295 if (s->ts == NULL) { | 295 if (s->ts == NULL) { |
296 av_free(s); | 296 av_free(s); |
297 return NULL; | 297 return NULL; |
298 } | 298 } |
299 } else { | 299 } else { |
422 return rv; | 422 return rv; |
423 } else { | 423 } else { |
424 // TODO: Move to a dynamic packet handler (like above) | 424 // TODO: Move to a dynamic packet handler (like above) |
425 if (s->read_buf_index >= s->read_buf_size) | 425 if (s->read_buf_index >= s->read_buf_size) |
426 return -1; | 426 return -1; |
427 ret = mpegts_parse_packet(s->ts, pkt, s->buf + s->read_buf_index, | 427 ret = ff_mpegts_parse_packet(s->ts, pkt, s->buf + s->read_buf_index, |
428 s->read_buf_size - s->read_buf_index); | 428 s->read_buf_size - s->read_buf_index); |
429 if (ret < 0) | 429 if (ret < 0) |
430 return -1; | 430 return -1; |
431 s->read_buf_index += ret; | 431 s->read_buf_index += ret; |
432 if (s->read_buf_index < s->read_buf_size) | 432 if (s->read_buf_index < s->read_buf_size) |
471 len -= 12; | 471 len -= 12; |
472 buf += 12; | 472 buf += 12; |
473 | 473 |
474 if (!st) { | 474 if (!st) { |
475 /* specific MPEG2TS demux support */ | 475 /* specific MPEG2TS demux support */ |
476 ret = mpegts_parse_packet(s->ts, pkt, buf, len); | 476 ret = ff_mpegts_parse_packet(s->ts, pkt, buf, len); |
477 if (ret < 0) | 477 if (ret < 0) |
478 return -1; | 478 return -1; |
479 if (ret < len) { | 479 if (ret < len) { |
480 s->read_buf_size = len - ret; | 480 s->read_buf_size = len - ret; |
481 memcpy(s->buf, buf + ret, s->read_buf_size); | 481 memcpy(s->buf, buf + ret, s->read_buf_size); |
558 | 558 |
559 void rtp_parse_close(RTPDemuxContext *s) | 559 void rtp_parse_close(RTPDemuxContext *s) |
560 { | 560 { |
561 // TODO: fold this into the protocol specific data fields. | 561 // TODO: fold this into the protocol specific data fields. |
562 if (!strcmp(ff_rtp_enc_name(s->payload_type), "MP2T")) { | 562 if (!strcmp(ff_rtp_enc_name(s->payload_type), "MP2T")) { |
563 mpegts_parse_close(s->ts); | 563 ff_mpegts_parse_close(s->ts); |
564 } | 564 } |
565 av_free(s); | 565 av_free(s); |
566 } | 566 } |