diff options
author | James Almer <jamrial@gmail.com> | 2014-08-06 20:59:56 -0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-07 04:28:11 +0200 |
commit | 5b12b4fc4b2217a5ea69c4ca6dbb5debeb39bb2b (patch) | |
tree | 2af04d514b854ec70a99272c2f352dfa4702726e /libavformat | |
parent | 1c59419419d2bdff50627ab15fb4abff4cdb3b29 (diff) | |
download | ffmpeg-5b12b4fc4b2217a5ea69c4ca6dbb5debeb39bb2b.tar.gz |
lavf/mpegts: rename ff_mpegts_parse_*() to avpriv_mpegts_parse_*()
The were wrongly being exported and used by libavdevice
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mpegts.c | 26 | ||||
-rw-r--r-- | libavformat/mpegts.h | 7 | ||||
-rw-r--r-- | libavformat/rtpdec_mpegts.c | 12 | ||||
-rw-r--r-- | libavformat/rtsp.c | 8 | ||||
-rw-r--r-- | libavformat/version.h | 4 |
5 files changed, 41 insertions, 16 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 405cade417..55816de6c0 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2625,7 +2625,7 @@ static int64_t mpegts_get_dts(AVFormatContext *s, int stream_index, /**************************************************************/ /* parsing functions - called from other demuxers such as RTP */ -MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s) +MpegTSContext *avpriv_mpegts_parse_open(AVFormatContext *s) { MpegTSContext *ts; @@ -2644,8 +2644,8 @@ MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s) /* return the consumed length if a packet was output, or -1 if no * packet is output */ -int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, - const uint8_t *buf, int len) +int avpriv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, + const uint8_t *buf, int len) { int len1; @@ -2669,12 +2669,30 @@ int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, return len1 - len; } -void ff_mpegts_parse_close(MpegTSContext *ts) +void avpriv_mpegts_parse_close(MpegTSContext *ts) { mpegts_free(ts); av_free(ts); } +#if LIBAVFORMAT_VERSION_MAJOR < 56 +MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s) +{ + return avpriv_mpegts_parse_open(s); +} + +int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, + const uint8_t *buf, int len) +{ + return avpriv_mpegts_parse_packet(ts, pkt, buf, len); +} + +void ff_mpegts_parse_close(MpegTSContext *ts) +{ + return avpriv_mpegts_parse_close(ts); +} +#endif + AVInputFormat ff_mpegts_demuxer = { .name = "mpegts", .long_name = NULL_IF_CONFIG_SMALL("MPEG-TS (MPEG-2 Transport Stream)"), diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h index 50a02590fa..1cd1ba1770 100644 --- a/libavformat/mpegts.h +++ b/libavformat/mpegts.h @@ -63,10 +63,17 @@ typedef struct MpegTSContext MpegTSContext; +MpegTSContext *avpriv_mpegts_parse_open(AVFormatContext *s); +int avpriv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, + const uint8_t *buf, int len); +void avpriv_mpegts_parse_close(MpegTSContext *ts); + +#if LIBAVFORMAT_VERSION_MAJOR < 56 MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s); int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, const uint8_t *buf, int len); void ff_mpegts_parse_close(MpegTSContext *ts); +#endif typedef struct SLConfigDescr { int use_au_start; diff --git a/libavformat/rtpdec_mpegts.c b/libavformat/rtpdec_mpegts.c index 5b851c4fd7..0c2b71745e 100644 --- a/libavformat/rtpdec_mpegts.c +++ b/libavformat/rtpdec_mpegts.c @@ -40,14 +40,14 @@ static void mpegts_free_context(PayloadContext *data) if (!data) return; if (data->ts) - ff_mpegts_parse_close(data->ts); + avpriv_mpegts_parse_close(data->ts); av_free(data); } static av_cold int mpegts_init(AVFormatContext *ctx, int st_index, PayloadContext *data) { - data->ts = ff_mpegts_parse_open(ctx); + data->ts = avpriv_mpegts_parse_open(ctx); if (!data->ts) return AVERROR(ENOMEM); return 0; @@ -72,8 +72,8 @@ static int mpegts_handle_packet(AVFormatContext *ctx, PayloadContext *data, if (!buf) { if (data->read_buf_index >= data->read_buf_size) return AVERROR(EAGAIN); - ret = ff_mpegts_parse_packet(data->ts, pkt, data->buf + data->read_buf_index, - data->read_buf_size - data->read_buf_index); + ret = avpriv_mpegts_parse_packet(data->ts, pkt, data->buf + data->read_buf_index, + data->read_buf_size - data->read_buf_index); if (ret < 0) return AVERROR(EAGAIN); data->read_buf_index += ret; @@ -83,8 +83,8 @@ static int mpegts_handle_packet(AVFormatContext *ctx, PayloadContext *data, return 0; } - ret = ff_mpegts_parse_packet(data->ts, pkt, buf, len); - /* The only error that can be returned from ff_mpegts_parse_packet + ret = avpriv_mpegts_parse_packet(data->ts, pkt, buf, len); + /* The only error that can be returned from avpriv_mpegts_parse_packet * is "no more data to return from the provided buffer", so return * AVERROR(EAGAIN) for all errors */ if (ret < 0) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 5212dde6bf..ce4763edee 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -439,7 +439,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, /* no corresponding stream */ if (rt->transport == RTSP_TRANSPORT_RAW) { if (!rt->ts && CONFIG_RTPDEC) - rt->ts = ff_mpegts_parse_open(s); + rt->ts = avpriv_mpegts_parse_open(s); } else { RTPDynamicProtocolHandler *handler; handler = ff_rtp_handler_find_by_id( @@ -728,7 +728,7 @@ void ff_rtsp_close_streams(AVFormatContext *s) avformat_close_input(&rt->asf_ctx); } if (rt->ts && CONFIG_RTPDEC) - ff_mpegts_parse_close(rt->ts); + avpriv_mpegts_parse_close(rt->ts); av_free(rt->p); av_free(rt->recvbuf); } @@ -1977,7 +1977,7 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt) } else if (rt->transport == RTSP_TRANSPORT_RTP) { ret = ff_rtp_parse_packet(rt->cur_transport_priv, pkt, NULL, 0); } else if (rt->ts && CONFIG_RTPDEC) { - ret = ff_mpegts_parse_packet(rt->ts, pkt, rt->recvbuf + rt->recvbuf_pos, rt->recvbuf_len - rt->recvbuf_pos); + ret = avpriv_mpegts_parse_packet(rt->ts, pkt, rt->recvbuf + rt->recvbuf_pos, rt->recvbuf_len - rt->recvbuf_pos); if (ret >= 0) { rt->recvbuf_pos += ret; ret = rt->recvbuf_pos < rt->recvbuf_len; @@ -2116,7 +2116,7 @@ redo: } } } else if (rt->ts && CONFIG_RTPDEC) { - ret = ff_mpegts_parse_packet(rt->ts, pkt, rt->recvbuf, len); + ret = avpriv_mpegts_parse_packet(rt->ts, pkt, rt->recvbuf, len); if (ret >= 0) { if (ret < len) { rt->recvbuf_len = len; diff --git a/libavformat/version.h b/libavformat/version.h index 9a1c40c1db..ffa9f8721d 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -31,8 +31,8 @@ #define LIBAVFORMAT_VERSION_MAJOR 55 -#define LIBAVFORMAT_VERSION_MINOR 51 -#define LIBAVFORMAT_VERSION_MICRO 101 +#define LIBAVFORMAT_VERSION_MINOR 52 +#define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ |