From 52375ba5677e54ebd5dc4e14ffaa0a3e9b676ce7 Mon Sep 17 00:00:00 2001 From: Justin Ruggles <justin.ruggles@gmail.com> Date: Wed, 19 Oct 2011 13:16:01 -0400 Subject: flvenc: adjust for negative DTS for all codecs, not just H.264 --- libavformat/flvenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat') diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 23d19cd506..851ce491b0 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -410,9 +410,9 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) if (ff_avc_parse_nal_units_buf(pkt->data, &data, &size) < 0) return -1; } - if (!flv->delay && pkt->dts < 0) - flv->delay = -pkt->dts; } + if (!flv->delay && pkt->dts < 0) + flv->delay = -pkt->dts; ts = pkt->dts + flv->delay; // add delay to force positive dts if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { -- cgit v1.2.3 From 4ee247a2bdf2fbe81026a428d4affc46c81f28db Mon Sep 17 00:00:00 2001 From: Justin Ruggles <justin.ruggles@gmail.com> Date: Wed, 19 Oct 2011 13:20:15 -0400 Subject: flvenc: check packet duration in speex using timestamps Using AVCodecContext.frame_size is not reliable. --- libavformat/flvenc.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'libavformat') diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 851ce491b0..cf77157636 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -58,7 +58,7 @@ typedef struct FLVContext { int64_t filesize_offset; int64_t duration; int delay; ///< first dts delay for AVC - int64_t last_video_ts; + int64_t last_ts; } FLVContext; static int get_audio_flags(AVCodecContext *enc){ @@ -75,11 +75,6 @@ static int get_audio_flags(AVCodecContext *enc){ av_log(enc, AV_LOG_ERROR, "flv only supports mono Speex audio\n"); return -1; } - if (enc->frame_size / 320 > 8) { - av_log(enc, AV_LOG_WARNING, "Warning: Speex stream has more than " - "8 frames per packet. Adobe Flash " - "Player cannot handle this!\n"); - } return FLV_CODECID_SPEEX | FLV_SAMPLERATE_11025HZ | FLV_SAMPLESSIZE_16BIT; } else { switch (enc->sample_rate) { @@ -220,7 +215,7 @@ static int flv_write_header(AVFormatContext *s) } } - flv->last_video_ts = -1; + flv->last_ts = -1; /* write meta_tag */ avio_w8(pb, 18); // tag type META @@ -349,7 +344,7 @@ static int flv_write_trailer(AVFormatContext *s) AVCodecContext *enc = s->streams[i]->codec; if (enc->codec_type == AVMEDIA_TYPE_VIDEO && enc->codec_id == CODEC_ID_H264) { - put_avc_eos_tag(pb, flv->last_video_ts); + put_avc_eos_tag(pb, flv->last_ts); } } @@ -415,10 +410,17 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) flv->delay = -pkt->dts; ts = pkt->dts + flv->delay; // add delay to force positive dts - if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { - if (flv->last_video_ts < ts) - flv->last_video_ts = ts; + + /* check Speex packet duration */ + if (enc->codec_id == CODEC_ID_SPEEX && ts - flv->last_ts > 160) { + av_log(s, AV_LOG_WARNING, "Warning: Speex stream has more than " + "8 frames per packet. Adobe Flash " + "Player cannot handle this!\n"); } + + if (flv->last_ts < ts) + flv->last_ts = ts; + avio_wb24(pb,size + flags_size); avio_wb24(pb,ts); avio_w8(pb,(ts >> 24) & 0x7F); // timestamps are 32bits _signed_ -- cgit v1.2.3 From 0e69c0477399a5545d42456d6c3aec4a3650bb67 Mon Sep 17 00:00:00 2001 From: Justin Ruggles <justin.ruggles@gmail.com> Date: Wed, 19 Oct 2011 13:28:12 -0400 Subject: ogg/speex: set correct timestamp and duration for the first packet. The first timestamp should be negative due to delay. Also, do not set AVCodecContext.frame_size unnecessarily. --- libavformat/oggparsespeex.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'libavformat') diff --git a/libavformat/oggparsespeex.c b/libavformat/oggparsespeex.c index 2f4aec7f07..bbeeb20d60 100644 --- a/libavformat/oggparsespeex.c +++ b/libavformat/oggparsespeex.c @@ -31,6 +31,7 @@ #include "oggdec.h" struct speex_params { + int packet_size; int final_packet_duration; int seq; }; @@ -58,14 +59,10 @@ static int speex_header(AVFormatContext *s, int idx) { st->codec->sample_rate = AV_RL32(p + 36); st->codec->channels = AV_RL32(p + 48); - /* We treat the whole Speex packet as a single frame everywhere Speex - is handled in Libav. This avoids the complexities of splitting - and joining individual Speex frames, which are not always - byte-aligned. */ - st->codec->frame_size = AV_RL32(p + 56); - frames_per_packet = AV_RL32(p + 64); + spxp->packet_size = AV_RL32(p + 56); + frames_per_packet = AV_RL32(p + 64); if (frames_per_packet) - st->codec->frame_size *= frames_per_packet; + spxp->packet_size *= frames_per_packet; st->codec->extradata_size = os->psize; st->codec->extradata = av_malloc(st->codec->extradata_size @@ -95,7 +92,7 @@ static int speex_packet(AVFormatContext *s, int idx) struct ogg *ogg = s->priv_data; struct ogg_stream *os = ogg->streams + idx; struct speex_params *spxp = os->private; - int packet_size = s->streams[idx]->codec->frame_size; + int packet_size = spxp->packet_size; if (os->flags & OGG_FLAG_EOS && os->lastpts != AV_NOPTS_VALUE && os->granule > 0) { @@ -108,9 +105,10 @@ static int speex_packet(AVFormatContext *s, int idx) if (!os->lastpts && os->granule > 0) /* first packet */ - os->pduration = os->granule - packet_size * (ogg_page_packets(os) - 1); - else if (os->flags & OGG_FLAG_EOS && os->segp == os->nsegs && - spxp->final_packet_duration) + os->lastpts = os->lastdts = os->granule - packet_size * + ogg_page_packets(os); + if (os->flags & OGG_FLAG_EOS && os->segp == os->nsegs && + spxp->final_packet_duration) /* final packet */ os->pduration = spxp->final_packet_duration; else -- cgit v1.2.3 From 9ef6c7977f827e73fcc6e7f5ef6165936142eab4 Mon Sep 17 00:00:00 2001 From: Justin Ruggles <justin.ruggles@gmail.com> Date: Wed, 19 Oct 2011 14:00:06 -0400 Subject: avformat: do not require frame_size for Speex. Having it there forces decoding of a frame in order to get frame_size, but it is not really needed for proper demuxing or decoding. --- libavformat/utils.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libavformat') diff --git a/libavformat/utils.c b/libavformat/utils.c index 9735d455d9..5e3e60b198 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2070,7 +2070,6 @@ static int has_codec_parameters(AVCodecContext *avctx) avctx->codec_id == CODEC_ID_MP1 || avctx->codec_id == CODEC_ID_MP2 || avctx->codec_id == CODEC_ID_MP3 || - avctx->codec_id == CODEC_ID_SPEEX || avctx->codec_id == CODEC_ID_CELT)) return 0; break; -- cgit v1.2.3 From 1fa395e471d563166f3fe3071fce8148e27679a8 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 08:58:50 +0200 Subject: lavf: use avpriv_ prefix for ff_new_chapter(). It's used in libavdevice. --- libavformat/asfdec.c | 2 +- libavformat/ffmetadec.c | 2 +- libavformat/internal.h | 4 ++-- libavformat/matroskadec.c | 2 +- libavformat/mov.c | 4 ++-- libavformat/nutdec.c | 2 +- libavformat/oggparsevorbis.c | 2 +- libavformat/utils.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) (limited to 'libavformat') diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 48ecec78b4..88091a5c9e 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -573,7 +573,7 @@ static int asf_read_marker(AVFormatContext *s, int64_t size) name_len = avio_rl32(pb); // name length if ((ret = avio_get_str16le(pb, name_len * 2, name, sizeof(name))) < name_len) avio_skip(pb, name_len - ret); - ff_new_chapter(s, i, (AVRational){1, 10000000}, pres_time, AV_NOPTS_VALUE, name ); + avpriv_new_chapter(s, i, (AVRational){1, 10000000}, pres_time, AV_NOPTS_VALUE, name ); } return 0; diff --git a/libavformat/ffmetadec.c b/libavformat/ffmetadec.c index b2415155f1..21e5ee9da4 100644 --- a/libavformat/ffmetadec.c +++ b/libavformat/ffmetadec.c @@ -75,7 +75,7 @@ static AVChapter *read_chapter(AVFormatContext *s) end = AV_NOPTS_VALUE; } - return ff_new_chapter(s, s->nb_chapters, tb, start, end, NULL); + return avpriv_new_chapter(s, s->nb_chapters, tb, start, end, NULL); } static uint8_t *unescape(uint8_t *buf, int size) diff --git a/libavformat/internal.h b/libavformat/internal.h index 8440e6bd0a..9ef9d64051 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -225,8 +225,8 @@ int ff_add_index_entry(AVIndexEntry **index_entries, * * @return AVChapter or NULL on error */ -AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, - int64_t start, int64_t end, const char *title); +AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base, + int64_t start, int64_t end, const char *title); /** * Ensure the index uses less memory than the maximum specified in diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 78b27b6bd3..b3466db003 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1599,7 +1599,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) if (chapters[i].start != AV_NOPTS_VALUE && chapters[i].uid && (max_start==0 || chapters[i].start > max_start)) { chapters[i].chapter = - ff_new_chapter(s, chapters[i].uid, (AVRational){1, 1000000000}, + avpriv_new_chapter(s, chapters[i].uid, (AVRational){1, 1000000000}, chapters[i].start, chapters[i].end, chapters[i].title); av_dict_set(&chapters[i].chapter->metadata, diff --git a/libavformat/mov.c b/libavformat/mov.c index d93969ce2a..62c3be36a2 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -287,7 +287,7 @@ static int mov_read_chpl(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_read(pb, str, str_len); str[str_len] = 0; - ff_new_chapter(c->fc, i, (AVRational){1,10000000}, start, AV_NOPTS_VALUE, str); + avpriv_new_chapter(c->fc, i, (AVRational){1,10000000}, start, AV_NOPTS_VALUE, str); } return 0; } @@ -2420,7 +2420,7 @@ static void mov_read_chapters(AVFormatContext *s) } } - ff_new_chapter(s, i, st->time_base, sample->timestamp, end, title); + avpriv_new_chapter(s, i, st->time_base, sample->timestamp, end, title); av_freep(&title); } finish: diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 730d6884cf..fb5ccf7fa9 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -416,7 +416,7 @@ static int decode_info_header(NUTContext *nut){ if(chapter_id && !stream_id_plus1){ int64_t start= chapter_start / nut->time_base_count; - chapter= ff_new_chapter(s, chapter_id, + chapter= avpriv_new_chapter(s, chapter_id, nut->time_base[chapter_start % nut->time_base_count], start, start + chapter_len, NULL); metadata = &chapter->metadata; diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 86951f3e2f..8a406976b5 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -45,7 +45,7 @@ static int ogm_chapter(AVFormatContext *as, uint8_t *key, uint8_t *val) if (sscanf(val, "%02d:%02d:%02d.%03d", &h, &m, &s, &ms) < 4) return 0; - ff_new_chapter(as, cnum, (AVRational){1,1000}, + avpriv_new_chapter(as, cnum, (AVRational){1,1000}, ms + 1000*(s + 60*(m + 60*h)), AV_NOPTS_VALUE, NULL); av_free(val); diff --git a/libavformat/utils.c b/libavformat/utils.c index 5e3e60b198..1c1a7482e5 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2739,7 +2739,7 @@ AVProgram *av_new_program(AVFormatContext *ac, int id) return program; } -AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, int64_t start, int64_t end, const char *title) +AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base, int64_t start, int64_t end, const char *title) { AVChapter *chapter = NULL; int i; -- cgit v1.2.3 From ab88b25f99a29b131ff72bf9a833425fe5db5a3b Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 08:58:50 +0200 Subject: lavf: use avpriv_ prefix for some dv functions. They are used in libavdevice. --- libavformat/avidec.c | 6 +++--- libavformat/dv.c | 12 ++++++------ libavformat/dv.h | 6 +++--- libavformat/mov.c | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'libavformat') diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 71aa0365d3..68d652a120 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -462,7 +462,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) av_freep(&s->streams[0]); s->nb_streams = 0; if (CONFIG_DV_DEMUXER) { - avi->dv_demux = dv_init_demux(s); + avi->dv_demux = avpriv_dv_init_demux(s); if (!avi->dv_demux) goto fail; } @@ -979,7 +979,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt) void* dstr; if (CONFIG_DV_DEMUXER && avi->dv_demux) { - int size = dv_get_packet(avi->dv_demux, pkt); + int size = avpriv_dv_get_packet(avi->dv_demux, pkt); if (size >= 0) return size; } @@ -1079,7 +1079,7 @@ resync: if (CONFIG_DV_DEMUXER && avi->dv_demux) { dstr = pkt->destruct; - size = dv_produce_packet(avi->dv_demux, pkt, + size = avpriv_dv_produce_packet(avi->dv_demux, pkt, pkt->data, pkt->size); pkt->destruct = dstr; pkt->flags |= AV_PKT_FLAG_KEY; diff --git a/libavformat/dv.c b/libavformat/dv.c index 5b229e9f07..5b6fb6210b 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -270,7 +270,7 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame) * The following 3 functions constitute our interface to the world */ -DVDemuxContext* dv_init_demux(AVFormatContext *s) +DVDemuxContext* avpriv_dv_init_demux(AVFormatContext *s) { DVDemuxContext *c; @@ -299,7 +299,7 @@ DVDemuxContext* dv_init_demux(AVFormatContext *s) return c; } -int dv_get_packet(DVDemuxContext *c, AVPacket *pkt) +int avpriv_dv_get_packet(DVDemuxContext *c, AVPacket *pkt) { int size = -1; int i; @@ -316,7 +316,7 @@ int dv_get_packet(DVDemuxContext *c, AVPacket *pkt) return size; } -int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, +int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, uint8_t* buf, int buf_size) { int size, i; @@ -407,7 +407,7 @@ static int dv_read_header(AVFormatContext *s, unsigned state, marker_pos = 0; RawDVContext *c = s->priv_data; - c->dv_demux = dv_init_demux(s); + c->dv_demux = avpriv_dv_init_demux(s); if (!c->dv_demux) return -1; @@ -450,7 +450,7 @@ static int dv_read_packet(AVFormatContext *s, AVPacket *pkt) int size; RawDVContext *c = s->priv_data; - size = dv_get_packet(c->dv_demux, pkt); + size = avpriv_dv_get_packet(c->dv_demux, pkt); if (size < 0) { if (!c->dv_demux->sys) @@ -459,7 +459,7 @@ static int dv_read_packet(AVFormatContext *s, AVPacket *pkt) if (avio_read(s->pb, c->buf, size) <= 0) return AVERROR(EIO); - size = dv_produce_packet(c->dv_demux, pkt, c->buf, size); + size = avpriv_dv_produce_packet(c->dv_demux, pkt, c->buf, size); } return size; diff --git a/libavformat/dv.h b/libavformat/dv.h index 650699d2d7..b4bb10d4bc 100644 --- a/libavformat/dv.h +++ b/libavformat/dv.h @@ -31,9 +31,9 @@ #include "avformat.h" typedef struct DVDemuxContext DVDemuxContext; -DVDemuxContext* dv_init_demux(AVFormatContext* s); -int dv_get_packet(DVDemuxContext*, AVPacket *); -int dv_produce_packet(DVDemuxContext*, AVPacket*, uint8_t*, int); +DVDemuxContext* avpriv_dv_init_demux(AVFormatContext* s); +int avpriv_dv_get_packet(DVDemuxContext*, AVPacket *); +int avpriv_dv_produce_packet(DVDemuxContext*, AVPacket*, uint8_t*, int); void dv_offset_reset(DVDemuxContext *c, int64_t frame_offset); typedef struct DVMuxContext DVMuxContext; diff --git a/libavformat/mov.c b/libavformat/mov.c index 62c3be36a2..6baddebb82 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1249,7 +1249,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) #if CONFIG_DV_DEMUXER case CODEC_ID_DVAUDIO: c->dv_fctx = avformat_alloc_context(); - c->dv_demux = dv_init_demux(c->dv_fctx); + c->dv_demux = avpriv_dv_init_demux(c->dv_fctx); if (!c->dv_demux) { av_log(c->fc, AV_LOG_ERROR, "dv demux context init error\n"); return -1; @@ -2528,10 +2528,10 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) } #if CONFIG_DV_DEMUXER if (mov->dv_demux && sc->dv_audio_container) { - dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size); + avpriv_dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size); av_free(pkt->data); pkt->size = 0; - ret = dv_get_packet(mov->dv_demux, pkt); + ret = avpriv_dv_get_packet(mov->dv_demux, pkt); if (ret < 0) return ret; } -- cgit v1.2.3 From 8d74bf17c6d6280195854f4dadb19ef37d054566 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 09:14:04 +0200 Subject: lavf: hide private symbols. Overhead as reported by rbelf-size goes from 40147 to 20877. --- libavformat/libavformat.v | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'libavformat') diff --git a/libavformat/libavformat.v b/libavformat/libavformat.v index 0ec1c3c4de..2a49539f0a 100644 --- a/libavformat/libavformat.v +++ b/libavformat/libavformat.v @@ -1,7 +1,23 @@ LIBAVFORMAT_$MAJOR { - global: *; - local: - ff_*_demuxer; - ff_*_muxer; - ff_*_protocol; + global: av*; + #FIXME those are for avserver + ff_inet_aton; + ff_socket_nonblock; + ffm_set_write_index; + ffm_read_write_index; + ffm_write_write_index; + ff_rtsp_parse_line; + ff_rtp_get_local_rtp_port; + ff_rtp_get_local_rtcp_port; + ffio_open_dyn_packet_buf; + url_open; + url_close; + url_write; + url_get_max_packet_size; + #those are deprecated, remove on next bump + find_info_tag; + parse_date; + dump_format; + url_*; + local: *; }; -- cgit v1.2.3 From 73ae27e17be5fd0a4e34e7ea8a449ca59bc09664 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 09:22:04 +0200 Subject: lavc: use avpriv_ prefix for ff_aac_parse_header(). It's used in lavf. --- libavformat/spdifdec.c | 2 +- libavformat/spdifenc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat') diff --git a/libavformat/spdifdec.c b/libavformat/spdifdec.c index 0cbbc54e0f..3daf23fb69 100644 --- a/libavformat/spdifdec.c +++ b/libavformat/spdifdec.c @@ -57,7 +57,7 @@ static int spdif_get_offset_and_codec(AVFormatContext *s, break; case IEC61937_MPEG2_AAC: init_get_bits(&gbc, buf, AAC_ADTS_HEADER_SIZE * 8); - if (ff_aac_parse_header(&gbc, &aac_hdr)) { + if (avpriv_aac_parse_header(&gbc, &aac_hdr)) { if (s) /* be silent during a probe */ av_log(s, AV_LOG_ERROR, "Invalid AAC packet in IEC 61937\n"); return AVERROR_INVALIDDATA; diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c index 9e571518d8..d541aba848 100644 --- a/libavformat/spdifenc.c +++ b/libavformat/spdifenc.c @@ -349,7 +349,7 @@ static int spdif_header_aac(AVFormatContext *s, AVPacket *pkt) int ret; init_get_bits(&gbc, pkt->data, AAC_ADTS_HEADER_SIZE * 8); - ret = ff_aac_parse_header(&gbc, &hdr); + ret = avpriv_aac_parse_header(&gbc, &hdr); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Wrong AAC file format\n"); return AVERROR_INVALIDDATA; -- cgit v1.2.3 From 82ab61f9015659419e0a2766ee031c367e3f2908 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 09:28:53 +0200 Subject: lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf. Specifically, ff_mpa_freq_tab, ff_mpa_bitrate_tab, ff_mpa_decode_header, ff_mpegaudio_decode_header. --- libavformat/isom.c | 2 +- libavformat/mp3dec.c | 4 ++-- libavformat/mp3enc.c | 8 ++++---- libavformat/nutenc.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'libavformat') diff --git a/libavformat/isom.c b/libavformat/isom.c index d7c0af101e..e5fd859472 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -437,7 +437,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext st->codec->extradata_size); st->codec->channels = cfg.channels; if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4 - st->codec->sample_rate = ff_mpa_freq_tab[cfg.sampling_index]; + st->codec->sample_rate = avpriv_mpa_freq_tab[cfg.sampling_index]; else if (cfg.ext_sample_rate) st->codec->sample_rate = cfg.ext_sample_rate; else diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 09494de136..9011f9f996 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -51,7 +51,7 @@ static int mp3_read_probe(AVProbeData *p) for(frames = 0; buf2 < end; frames++) { header = AV_RB32(buf2); - fsize = ff_mpa_decode_header(&avctx, header, &sample_rate, &sample_rate, &sample_rate, &sample_rate); + fsize = avpriv_mpa_decode_header(&avctx, header, &sample_rate, &sample_rate, &sample_rate, &sample_rate); if(fsize < 0) break; buf2 += fsize; @@ -86,7 +86,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base) if(ff_mpa_check_header(v) < 0) return -1; - if (ff_mpegaudio_decode_header(&c, v) == 0) + if (avpriv_mpegaudio_decode_header(&c, v) == 0) vbrtag_size = c.frame_size; if(c.layer != 3) return -1; diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index 07c28e176d..64f8957a4c 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -217,12 +217,12 @@ static void mp3_write_xing(AVFormatContext *s) MPADecodeHeader mpah; int srate_idx, i, channels; - for (i = 0; i < FF_ARRAY_ELEMS(ff_mpa_freq_tab); i++) - if (ff_mpa_freq_tab[i] == codec->sample_rate) { + for (i = 0; i < FF_ARRAY_ELEMS(avpriv_mpa_freq_tab); i++) + if (avpriv_mpa_freq_tab[i] == codec->sample_rate) { srate_idx = i; break; } - if (i == FF_ARRAY_ELEMS(ff_mpa_freq_tab)) { + if (i == FF_ARRAY_ELEMS(avpriv_mpa_freq_tab)) { av_log(s, AV_LOG_ERROR, "Unsupported sample rate.\n"); return; } @@ -240,7 +240,7 @@ static void mp3_write_xing(AVFormatContext *s) header |= channels << 6; avio_wb32(s->pb, header); - ff_mpegaudio_decode_header(&mpah, header); + avpriv_mpegaudio_decode_header(&mpah, header); ffio_fill(s->pb, 0, xing_offset); ffio_wfourcc(s->pb, "Xing"); diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index f8a078cb8a..bde6ba26a8 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -59,10 +59,10 @@ static int find_expected_header(AVCodecContext *c, int size, int key_frame, uint else if(sample_rate < (44100 + 48000)/2) sample_rate_index=0; else sample_rate_index=1; - sample_rate= ff_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25); + sample_rate= avpriv_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25); for(bitrate_index=2; bitrate_index<30; bitrate_index++){ - frame_size = ff_mpa_bitrate_tab[lsf][layer-1][bitrate_index>>1]; + frame_size = avpriv_mpa_bitrate_tab[lsf][layer-1][bitrate_index>>1]; frame_size = (frame_size * 144000) / (sample_rate << lsf) + (bitrate_index&1); if(frame_size == size) -- cgit v1.2.3 From 59a9a235811dc5f6a2c8b631a320968a06a867d1 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 09:28:53 +0200 Subject: lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf. Specifically, ff_mpeg4audio_sample_rates, ff_mpeg4audio_get_config and ff_copy_pce_data --- libavformat/adtsenc.c | 4 ++-- libavformat/flvdec.c | 2 +- libavformat/isom.c | 2 +- libavformat/latmenc.c | 4 ++-- libavformat/matroskadec.c | 4 ++-- libavformat/matroskaenc.c | 2 +- libavformat/sdp.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) (limited to 'libavformat') diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c index 7f61e948fb..ce002fe4db 100644 --- a/libavformat/adtsenc.c +++ b/libavformat/adtsenc.c @@ -35,7 +35,7 @@ int ff_adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, uint8_t *buf int off; init_get_bits(&gb, buf, size * 8); - off = ff_mpeg4audio_get_config(&m4ac, buf, size); + off = avpriv_mpeg4audio_get_config(&m4ac, buf, size); if (off < 0) return off; skip_bits_long(&gb, off); @@ -67,7 +67,7 @@ int ff_adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, uint8_t *buf init_put_bits(&pb, adts->pce_data, MAX_PCE_SIZE); put_bits(&pb, 3, 5); //ID_PCE - adts->pce_size = (ff_copy_pce_data(&pb, &gb) + 3) / 8; + adts->pce_size = (avpriv_copy_pce_data(&pb, &gb) + 3) / 8; flush_put_bits(&pb); } diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 5e354b11be..395c8f8a57 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -531,7 +531,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; if (st->codec->codec_id == CODEC_ID_AAC) { MPEG4AudioConfig cfg; - ff_mpeg4audio_get_config(&cfg, st->codec->extradata, + avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata, st->codec->extradata_size); st->codec->channels = cfg.channels; if (cfg.ext_sample_rate) diff --git a/libavformat/isom.c b/libavformat/isom.c index e5fd859472..c5b01f22e3 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -433,7 +433,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext st->codec->extradata_size = len; if (st->codec->codec_id == CODEC_ID_AAC) { MPEG4AudioConfig cfg; - ff_mpeg4audio_get_config(&cfg, st->codec->extradata, + avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata, st->codec->extradata_size); st->codec->channels = cfg.channels; if (cfg.object_type == 29 && cfg.sampling_index < 3) // old mp3on4 diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c index 7c6d1eaf72..2e72c489bc 100644 --- a/libavformat/latmenc.c +++ b/libavformat/latmenc.c @@ -54,7 +54,7 @@ static int latm_decode_extradata(LATMContext *ctx, uint8_t *buf, int size) MPEG4AudioConfig m4ac; init_get_bits(&gb, buf, size * 8); - ctx->off = ff_mpeg4audio_get_config(&m4ac, buf, size); + ctx->off = avpriv_mpeg4audio_get_config(&m4ac, buf, size); if (ctx->off < 0) return ctx->off; skip_bits_long(&gb, ctx->off); @@ -111,7 +111,7 @@ static int latm_write_frame_header(AVFormatContext *s, PutBitContext *bs) ff_copy_bits(bs, avctx->extradata, ctx->off + 3); if (!ctx->channel_conf) { - ff_copy_pce_data(bs, &gb); + avpriv_copy_pce_data(bs, &gb); } } diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index b3466db003..8ee3698ac4 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1263,8 +1263,8 @@ static int matroska_aac_sri(int samplerate) { int sri; - for (sri=0; sri<FF_ARRAY_ELEMS(ff_mpeg4audio_sample_rates); sri++) - if (ff_mpeg4audio_sample_rates[sri] == samplerate) + for (sri=0; sri<FF_ARRAY_ELEMS(avpriv_mpeg4audio_sample_rates); sri++) + if (avpriv_mpeg4audio_sample_rates[sri] == samplerate) break; return sri; } diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 02d10afc72..a35a2fa09a 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -443,7 +443,7 @@ static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec, int { MPEG4AudioConfig mp4ac; - if (ff_mpeg4audio_get_config(&mp4ac, codec->extradata, codec->extradata_size) < 0) { + if (avpriv_mpeg4audio_get_config(&mp4ac, codec->extradata, codec->extradata_size) < 0) { av_log(s, AV_LOG_WARNING, "Error parsing AAC extradata, unable to determine samplerate.\n"); return; } diff --git a/libavformat/sdp.c b/libavformat/sdp.c index a586690d3f..5adf14dfd1 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -342,7 +342,7 @@ static char *latm_context2config(AVCodecContext *c) char *config; for (rate_index = 0; rate_index < 16; rate_index++) - if (ff_mpeg4audio_sample_rates[rate_index] == c->sample_rate) + if (avpriv_mpeg4audio_sample_rates[rate_index] == c->sample_rate) break; if (rate_index == 16) { av_log(c, AV_LOG_ERROR, "Unsupported sample rate\n"); -- cgit v1.2.3 From d9cca9fc6a4796c0a4235b25f5f7fd7191813f3a Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 09:28:53 +0200 Subject: lavc: use avpriv_ prefix for some flac symbols used in lavf. Specifically, ff_flac_parse_streaminfo, ff_flac_is_extradata_valid and ff_flac_parse_block_header --- libavformat/flacdec.c | 4 ++-- libavformat/flacenc.c | 2 +- libavformat/flacenc_header.c | 2 +- libavformat/oggenc.c | 2 +- libavformat/oggparseflac.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'libavformat') diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c index e6098adf4a..41912854b7 100644 --- a/libavformat/flacdec.c +++ b/libavformat/flacdec.c @@ -48,7 +48,7 @@ static int flac_read_header(AVFormatContext *s, /* process metadata blocks */ while (!s->pb->eof_reached && !metadata_last) { avio_read(s->pb, header, 4); - ff_flac_parse_block_header(header, &metadata_last, &metadata_type, + avpriv_flac_parse_block_header(header, &metadata_last, &metadata_type, &metadata_size); switch (metadata_type) { /* allocate and read metadata block for supported types */ @@ -87,7 +87,7 @@ static int flac_read_header(AVFormatContext *s, buffer = NULL; /* get codec params from STREAMINFO header */ - ff_flac_parse_streaminfo(st->codec, &si, st->codec->extradata); + avpriv_flac_parse_streaminfo(st->codec, &si, st->codec->extradata); /* set time base and duration */ if (si.samplerate > 0) { diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c index f14b30b0c5..00e89002fe 100644 --- a/libavformat/flacenc.c +++ b/libavformat/flacenc.c @@ -94,7 +94,7 @@ static int flac_write_trailer(struct AVFormatContext *s) enum FLACExtradataFormat format; int64_t file_size; - if (!ff_flac_is_extradata_valid(s->streams[0]->codec, &format, &streaminfo)) + if (!avpriv_flac_is_extradata_valid(s->streams[0]->codec, &format, &streaminfo)) return -1; if (pb->seekable) { diff --git a/libavformat/flacenc_header.c b/libavformat/flacenc_header.c index 90c5a776d3..ad8d55b380 100644 --- a/libavformat/flacenc_header.c +++ b/libavformat/flacenc_header.c @@ -34,7 +34,7 @@ int ff_flac_write_header(AVIOContext *pb, AVCodecContext *codec, enum FLACExtradataFormat format; header[4] = last_block ? 0x80 : 0x00; - if (!ff_flac_is_extradata_valid(codec, &format, &streaminfo)) + if (!avpriv_flac_is_extradata_valid(codec, &format, &streaminfo)) return -1; /* write "fLaC" stream marker and first metadata block header if needed */ diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index 49dedb35d7..d554b07c5b 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -254,7 +254,7 @@ static int ogg_build_flac_headers(AVCodecContext *avctx, uint8_t *streaminfo; uint8_t *p; - if (!ff_flac_is_extradata_valid(avctx, &format, &streaminfo)) + if (!avpriv_flac_is_extradata_valid(avctx, &format, &streaminfo)) return -1; // first packet: STREAMINFO diff --git a/libavformat/oggparseflac.c b/libavformat/oggparseflac.c index 53cd0fa582..e5f517fbdb 100644 --- a/libavformat/oggparseflac.c +++ b/libavformat/oggparseflac.c @@ -55,7 +55,7 @@ flac_header (AVFormatContext * s, int idx) if (get_bits_long(&gb, 32) != FLAC_STREAMINFO_SIZE) return -1; - ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start); + avpriv_flac_parse_streaminfo(st->codec, &si, streaminfo_start); st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_FLAC; -- cgit v1.2.3 From 242c73a0fd664be8fc1d69cc3e383c13524914b5 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 09:28:53 +0200 Subject: lavc: use avpriv_ prefix for some dv symbols used in lavf. Specifically, ff_dv_frame_profile and ff_dv_codec_profile. --- libavformat/dv.c | 6 +++--- libavformat/dvenc.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libavformat') diff --git a/libavformat/dv.c b/libavformat/dv.c index 5b6fb6210b..2813bc3b67 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -323,7 +323,7 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, uint8_t *ppcm[4] = {0}; if (buf_size < DV_PROFILE_BYTES || - !(c->sys = ff_dv_frame_profile(c->sys, buf, buf_size)) || + !(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) || buf_size < c->sys->frame_size) { return -1; /* Broken frame, or not enough data */ } @@ -369,7 +369,7 @@ static int64_t dv_frame_offset(AVFormatContext *s, DVDemuxContext *c, int64_t timestamp, int flags) { // FIXME: sys may be wrong if last dv_read_packet() failed (buffer is junk) - const DVprofile* sys = ff_dv_codec_profile(c->vst->codec); + const DVprofile* sys = avpriv_dv_codec_profile(c->vst->codec); int64_t offset; int64_t size = avio_size(s->pb) - s->data_offset; int64_t max_offset = ((size-1) / sys->frame_size) * sys->frame_size; @@ -432,7 +432,7 @@ static int dv_read_header(AVFormatContext *s, avio_seek(s->pb, -DV_PROFILE_BYTES, SEEK_CUR) < 0) return AVERROR(EIO); - c->dv_demux->sys = ff_dv_frame_profile(c->dv_demux->sys, c->buf, DV_PROFILE_BYTES); + c->dv_demux->sys = avpriv_dv_frame_profile(c->dv_demux->sys, c->buf, DV_PROFILE_BYTES); if (!c->dv_demux->sys) { av_log(s, AV_LOG_ERROR, "Can't determine profile of DV input stream.\n"); return -1; diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c index 5c55338e2c..bffad44b9f 100644 --- a/libavformat/dvenc.c +++ b/libavformat/dvenc.c @@ -325,7 +325,7 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s) c->ast[i]->codec->channels != 2)) goto bail_out; } - c->sys = ff_dv_codec_profile(vst->codec); + c->sys = avpriv_dv_codec_profile(vst->codec); if (!c->sys) goto bail_out; -- cgit v1.2.3 From 2361e59b98f1c78d9720e72aabfb847dd9906f12 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 09:45:27 +0200 Subject: lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header. It's used in lavf. --- libavformat/oggparsedirac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat') diff --git a/libavformat/oggparsedirac.c b/libavformat/oggparsedirac.c index f6afafd0e4..9991d5692c 100644 --- a/libavformat/oggparsedirac.c +++ b/libavformat/oggparsedirac.c @@ -36,7 +36,7 @@ static int dirac_header(AVFormatContext *s, int idx) return 0; init_get_bits(&gb, os->buf + os->pstart + 13, (os->psize - 13) * 8); - if (ff_dirac_parse_sequence_header(st->codec, &gb, &source) < 0) + if (avpriv_dirac_parse_sequence_header(st->codec, &gb, &source) < 0) return -1; st->codec->codec_type = AVMEDIA_TYPE_VIDEO; -- cgit v1.2.3 From 357db4c263bb7edfd9790414f0f378e752f924e9 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 09:45:27 +0200 Subject: lavc: use avpriv_ prefix for ff_split_xiph_headers. It's used in lavf. --- libavformat/matroskaenc.c | 2 +- libavformat/oggenc.c | 2 +- libavformat/sdp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'libavformat') diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index a35a2fa09a..1adb479dd8 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -423,7 +423,7 @@ static int put_xiph_codecpriv(AVFormatContext *s, AVIOContext *pb, AVCodecContex else first_header_size = 42; - if (ff_split_xiph_headers(codec->extradata, codec->extradata_size, + if (avpriv_split_xiph_headers(codec->extradata, codec->extradata_size, first_header_size, header_start, header_len) < 0) { av_log(s, AV_LOG_ERROR, "Extradata corrupt.\n"); return -1; diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index d554b07c5b..7549b3a0a3 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -377,7 +377,7 @@ static int ogg_write_header(AVFormatContext *s) int header_type = st->codec->codec_id == CODEC_ID_VORBIS ? 3 : 0x81; int framing_bit = st->codec->codec_id == CODEC_ID_VORBIS ? 1 : 0; - if (ff_split_xiph_headers(st->codec->extradata, st->codec->extradata_size, + if (avpriv_split_xiph_headers(st->codec->extradata, st->codec->extradata_size, st->codec->codec_id == CODEC_ID_VORBIS ? 30 : 42, oggstream->header, oggstream->header_len) < 0) { av_log(s, AV_LOG_ERROR, "Extradata corrupted\n"); diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 5adf14dfd1..ba3d4dd611 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -252,7 +252,7 @@ static char *xiph_extradata2config(AVCodecContext *c) return NULL; } - if (ff_split_xiph_headers(c->extradata, c->extradata_size, + if (avpriv_split_xiph_headers(c->extradata, c->extradata_size, first_header_size, header_start, header_len) < 0) { av_log(c, AV_LOG_ERROR, "Extradata corrupt.\n"); -- cgit v1.2.3 From 773375c3d04bc3436563d7128311f06767432e22 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 09:51:55 +0200 Subject: lavc: rename ff_find_start_code to avpriv_mpv_find_start_code It's used in lavf. --- libavformat/mpegtsenc.c | 2 +- libavformat/rtpenc_mpv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat') diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index d600d18b62..9f45f13247 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -950,7 +950,7 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt) } do { - p = ff_find_start_code(p, buf_end, &state); + p = avpriv_mpv_find_start_code(p, buf_end, &state); //av_log(s, AV_LOG_INFO, "nal %d\n", state & 0x1f); } while (p < buf_end && (state & 0x1f) != 9 && (state & 0x1f) != 5 && (state & 0x1f) != 1); diff --git a/libavformat/rtpenc_mpv.c b/libavformat/rtpenc_mpv.c index f6a5d7726a..1c67f9593b 100644 --- a/libavformat/rtpenc_mpv.c +++ b/libavformat/rtpenc_mpv.c @@ -56,7 +56,7 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size) r1 = buf1; while (1) { start_code = -1; - r = ff_find_start_code(r1, end, &start_code); + r = avpriv_mpv_find_start_code(r1, end, &start_code); if((start_code & 0xFFFFFF00) == 0x100) { /* New start code found */ if (start_code == 0x100) { -- cgit v1.2.3 From 9138a130cd69e6828da5796a0555eac5a0af2357 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 09:59:31 +0200 Subject: lavc: use avpriv_ prefix for ff_frame_rate_tab. It's used in lavf. --- libavformat/gxf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat') diff --git a/libavformat/gxf.c b/libavformat/gxf.c index 283e3a6246..473f33a427 100644 --- a/libavformat/gxf.c +++ b/libavformat/gxf.c @@ -185,9 +185,9 @@ static void gxf_material_tags(AVIOContext *pb, int *len, struct gxf_stream_info * @return fps as AVRational, or 0 / 0 if unknown */ static AVRational fps_tag2avr(int32_t fps) { - extern const AVRational ff_frame_rate_tab[]; + extern const AVRational avpriv_frame_rate_tab[]; if (fps < 1 || fps > 9) fps = 9; - return ff_frame_rate_tab[9 - fps]; // values have opposite order + return avpriv_frame_rate_tab[9 - fps]; // values have opposite order } /** -- cgit v1.2.3 From 6f89efeaa7eceb3408abb6e593d892ec819177a7 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 10:04:12 +0200 Subject: lavc: use avpriv_ prefix for ff_ac3_parse_header. It's used in lavf. --- libavformat/ac3dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat') diff --git a/libavformat/ac3dec.c b/libavformat/ac3dec.c index 2cb068e57c..ca6aee3685 100644 --- a/libavformat/ac3dec.c +++ b/libavformat/ac3dec.c @@ -41,7 +41,7 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) for(frames = 0; buf2 < end; frames++) { init_get_bits(&gbc, buf2, 54); - if(ff_ac3_parse_header(&gbc, &hdr) < 0) + if(avpriv_ac3_parse_header(&gbc, &hdr) < 0) break; if(buf2 + hdr.frame_size > end || av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, buf2 + 2, hdr.frame_size - 2)) -- cgit v1.2.3 From 9f51c682ee83ecf0995648d4574ac09b52bbcb24 Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 10:10:42 +0200 Subject: lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits. They are used in lavf. --- libavformat/latmenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavformat') diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c index 2e72c489bc..679f2cc9c6 100644 --- a/libavformat/latmenc.c +++ b/libavformat/latmenc.c @@ -106,9 +106,9 @@ static int latm_write_frame_header(AVFormatContext *s, PutBitContext *bs) /* AudioSpecificConfig */ if (ctx->object_type == AOT_ALS) { header_size = avctx->extradata_size-(ctx->off + 7) >> 3; - ff_copy_bits(bs, &avctx->extradata[ctx->off], header_size); + avpriv_copy_bits(bs, &avctx->extradata[ctx->off], header_size); } else { - ff_copy_bits(bs, avctx->extradata, ctx->off + 3); + avpriv_copy_bits(bs, avctx->extradata, ctx->off + 3); if (!ctx->channel_conf) { avpriv_copy_pce_data(bs, &gb); @@ -161,7 +161,7 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt) for (i = 0; i < pkt->size; i++) put_bits(&bs, 8, pkt->data[i]); - align_put_bits(&bs); + avpriv_align_put_bits(&bs); flush_put_bits(&bs); len = put_bits_count(&bs) >> 3; -- cgit v1.2.3 From 0842d58998f441768b5e4376aa0c1d7be0e07a8b Mon Sep 17 00:00:00 2001 From: Anton Khirnov <anton@khirnov.net> Date: Mon, 17 Oct 2011 10:12:51 +0200 Subject: lavc: use avpriv_ prefix for ff_toupper4. It's used in lavf. --- libavformat/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat') diff --git a/libavformat/utils.c b/libavformat/utils.c index 1c1a7482e5..d0a7fb90be 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2148,7 +2148,7 @@ enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag) return tags[i].id; } for(i=0; tags[i].id != CODEC_ID_NONE; i++) { - if (ff_toupper4(tag) == ff_toupper4(tags[i].tag)) + if (avpriv_toupper4(tag) == avpriv_toupper4(tags[i].tag)) return tags[i].id; } return CODEC_ID_NONE; @@ -2807,7 +2807,7 @@ static int validate_codec_tag(AVFormatContext *s, AVStream *st) for (n = 0; s->oformat->codec_tag[n]; n++) { avctag = s->oformat->codec_tag[n]; while (avctag->id != CODEC_ID_NONE) { - if (ff_toupper4(avctag->tag) == ff_toupper4(st->codec->codec_tag)) { + if (avpriv_toupper4(avctag->tag) == avpriv_toupper4(st->codec->codec_tag)) { id = avctag->id; if (id == st->codec->codec_id) return 1; -- cgit v1.2.3