[FFmpeg-cvslog] lavf: make av_set_pts_info private.
Anton Khirnov
git at videolan.org
Thu Dec 1 03:02:41 CET 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Nov 29 19:28:15 2011 +0100| [c3f9ebf74371b63fba0e7491e61904bbd165cd0f] | committer: Anton Khirnov
lavf: make av_set_pts_info private.
It's supposed to be called only from (de)muxers.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c3f9ebf74371b63fba0e7491e61904bbd165cd0f
---
libavdevice/alsa-audio-dec.c | 3 ++-
libavdevice/bktr.c | 3 ++-
libavdevice/fbdev.c | 3 ++-
libavdevice/jack_audio.c | 3 ++-
libavdevice/libcdio.c | 2 +-
libavdevice/libdc1394.c | 3 ++-
libavdevice/oss_audio.c | 3 ++-
libavdevice/pulse.c | 3 ++-
libavdevice/sndio_dec.c | 3 ++-
libavdevice/v4l.c | 3 ++-
libavdevice/v4l2.c | 3 ++-
libavdevice/vfwcap.c | 3 ++-
libavdevice/x11grab.c | 3 ++-
libavformat/4xm.c | 5 +++--
libavformat/aacdec.c | 3 ++-
libavformat/adxdec.c | 3 ++-
libavformat/aiffdec.c | 3 ++-
libavformat/aiffenc.c | 3 ++-
libavformat/amr.c | 3 ++-
libavformat/anm.c | 3 ++-
libavformat/ape.c | 3 ++-
libavformat/asfdec.c | 3 ++-
libavformat/asfenc.c | 3 ++-
libavformat/assdec.c | 2 +-
libavformat/au.c | 3 ++-
libavformat/avformat.h | 12 ++++--------
libavformat/avidec.c | 5 +++--
libavformat/avienc.c | 3 ++-
libavformat/avisynth.c | 3 ++-
libavformat/bethsoftvid.c | 3 ++-
libavformat/bfi.c | 5 +++--
libavformat/bink.c | 5 +++--
libavformat/bmv.c | 5 +++--
libavformat/c93.c | 3 ++-
libavformat/cafdec.c | 3 ++-
libavformat/cdg.c | 3 ++-
libavformat/dfa.c | 3 ++-
libavformat/dsicin.c | 5 +++--
libavformat/dv.c | 5 +++--
libavformat/dxa.c | 3 ++-
libavformat/eacdata.c | 3 ++-
libavformat/electronicarts.c | 3 ++-
libavformat/ffmdec.c | 3 ++-
libavformat/ffmenc.c | 3 ++-
libavformat/filmstripdec.c | 3 ++-
libavformat/flacdec.c | 3 ++-
libavformat/flic.c | 11 ++++++-----
libavformat/flvdec.c | 3 ++-
libavformat/flvenc.c | 2 +-
libavformat/gsmdec.c | 3 ++-
libavformat/gxf.c | 2 +-
libavformat/gxfenc.c | 5 +++--
libavformat/idcin.c | 5 +++--
libavformat/idroqdec.c | 5 +++--
libavformat/iff.c | 3 ++-
libavformat/img2.c | 2 +-
libavformat/internal.h | 13 +++++++++++++
libavformat/ipmovie.c | 5 +++--
libavformat/iss.c | 3 ++-
libavformat/iv8.c | 3 ++-
libavformat/ivfdec.c | 3 ++-
libavformat/jvdec.c | 5 +++--
libavformat/libnut.c | 5 +++--
libavformat/lmlm4.c | 3 ++-
libavformat/lxfdec.c | 7 ++++---
libavformat/matroskadec.c | 2 +-
libavformat/matroskaenc.c | 3 ++-
libavformat/mm.c | 5 +++--
libavformat/mmf.c | 5 +++--
libavformat/mov.c | 3 ++-
libavformat/movenc.c | 2 +-
libavformat/mp3dec.c | 3 ++-
libavformat/mpc.c | 3 ++-
libavformat/mpc8.c | 3 ++-
libavformat/mpegenc.c | 3 ++-
libavformat/mpegts.c | 8 ++++----
libavformat/mpegtsenc.c | 2 +-
libavformat/msnwc_tcp.c | 3 ++-
libavformat/mtv.c | 5 +++--
libavformat/mvi.c | 5 +++--
libavformat/mxfdec.c | 2 +-
libavformat/mxfenc.c | 4 ++--
libavformat/mxg.c | 5 +++--
libavformat/ncdec.c | 3 ++-
libavformat/nsvdec.c | 5 +++--
libavformat/nutdec.c | 2 +-
libavformat/nutenc.c | 2 +-
libavformat/nuv.c | 5 +++--
libavformat/oggdec.c | 2 +-
libavformat/oggenc.c | 4 ++--
libavformat/oggparsecelt.c | 3 ++-
libavformat/oggparsedirac.c | 5 +++--
libavformat/oggparseflac.c | 3 ++-
libavformat/oggparseogm.c | 5 +++--
libavformat/oggparseskeleton.c | 3 ++-
libavformat/oggparsespeex.c | 3 ++-
libavformat/oggparsetheora.c | 3 ++-
libavformat/oggparsevorbis.c | 2 +-
libavformat/oma.c | 5 +++--
libavformat/psxstr.c | 5 +++--
libavformat/pva.c | 5 +++--
libavformat/r3d.c | 5 +++--
libavformat/rawdec.c | 7 ++++---
libavformat/rl2.c | 5 +++--
libavformat/rmdec.c | 3 ++-
libavformat/rpl.c | 5 +++--
libavformat/rsodec.c | 2 +-
libavformat/rtpdec_asf.c | 3 ++-
libavformat/rtpdec_qt.c | 3 ++-
libavformat/rtpenc.c | 6 +++---
libavformat/rtsp.c | 6 +++---
libavformat/segafilm.c | 3 ++-
libavformat/sierravmd.c | 7 ++++---
libavformat/siff.c | 5 +++--
libavformat/smacker.c | 5 +++--
libavformat/sol.c | 3 ++-
libavformat/soxdec.c | 3 ++-
libavformat/srtdec.c | 2 +-
libavformat/swfdec.c | 6 +++---
libavformat/thp.c | 5 +++--
libavformat/tiertexseq.c | 5 +++--
libavformat/tmv.c | 5 +++--
libavformat/tta.c | 3 ++-
libavformat/tty.c | 3 ++-
libavformat/utils.c | 10 +++++++++-
libavformat/vc1test.c | 5 +++--
libavformat/vc1testenc.c | 3 ++-
libavformat/version.h | 3 +++
libavformat/vqf.c | 3 ++-
libavformat/wav.c | 7 ++++---
libavformat/wc3movie.c | 5 +++--
libavformat/westwood.c | 7 ++++---
libavformat/wtv.c | 2 +-
libavformat/wv.c | 3 ++-
libavformat/xa.c | 3 ++-
libavformat/xmv.c | 5 +++--
libavformat/xwma.c | 3 ++-
libavformat/yop.c | 3 ++-
libavformat/yuv4mpeg.c | 3 ++-
139 files changed, 338 insertions(+), 205 deletions(-)
diff --git a/libavdevice/alsa-audio-dec.c b/libavdevice/alsa-audio-dec.c
index 1346016..5344b19 100644
--- a/libavdevice/alsa-audio-dec.c
+++ b/libavdevice/alsa-audio-dec.c
@@ -47,6 +47,7 @@
#include <alsa/asoundlib.h>
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "libavutil/opt.h"
#include "alsa-audio.h"
@@ -102,7 +103,7 @@ static av_cold int audio_read_header(AVFormatContext *s1,
st->codec->codec_id = codec_id;
st->codec->sample_rate = s->sample_rate;
st->codec->channels = s->channels;
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
return 0;
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index 1a8562c..e6a1e8b 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -25,6 +25,7 @@
*/
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
@@ -275,7 +276,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
ret = AVERROR(ENOMEM);
goto out;
}
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in use */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in use */
s->width = width;
s->height = height;
diff --git a/libavdevice/fbdev.c b/libavdevice/fbdev.c
index ddace67..7444f47 100644
--- a/libavdevice/fbdev.c
+++ b/libavdevice/fbdev.c
@@ -43,6 +43,7 @@
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
struct rgb_pixfmt_map_entry {
int bits_per_pixel;
@@ -110,7 +111,7 @@ av_cold static int fbdev_read_header(AVFormatContext *avctx,
if (!(st = avformat_new_stream(avctx, NULL)))
return AVERROR(ENOMEM);
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in microseconds */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in microseconds */
/* NONBLOCK is ignored by the fbdev driver, only set for consistency */
if (avctx->flags & AVFMT_FLAG_NONBLOCK)
diff --git a/libavdevice/jack_audio.c b/libavdevice/jack_audio.c
index f75c176..dbe1771 100644
--- a/libavdevice/jack_audio.c
+++ b/libavdevice/jack_audio.c
@@ -29,6 +29,7 @@
#include "libavutil/opt.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "timefilter.h"
/**
@@ -244,7 +245,7 @@ static int audio_read_header(AVFormatContext *context, AVFormatParameters *param
stream->codec->sample_rate = self->sample_rate;
stream->codec->channels = self->nports;
- av_set_pts_info(stream, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(stream, 64, 1, 1000000); /* 64 bits pts in us */
return 0;
}
diff --git a/libavdevice/libcdio.c b/libavdevice/libcdio.c
index 6d0671a..e00272c 100644
--- a/libavdevice/libcdio.c
+++ b/libavdevice/libcdio.c
@@ -92,7 +92,7 @@ static av_cold int read_header(AVFormatContext *ctx, AVFormatParameters *ap)
st->duration = s->drive->audio_last_sector - s->drive->audio_first_sector;
else if (s->drive->tracks)
st->duration = s->drive->disc_toc[s->drive->tracks].dwStartSector;
- av_set_pts_info(st, 64, CDIO_CD_FRAMESIZE_RAW, 2*st->codec->channels*st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, CDIO_CD_FRAMESIZE_RAW, 2*st->codec->channels*st->codec->sample_rate);
for (i = 0; i < s->drive->tracks; i++) {
char title[16];
diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c
index bca014f..71f08b1 100644
--- a/libavdevice/libdc1394.c
+++ b/libavdevice/libdc1394.c
@@ -22,6 +22,7 @@
#include "config.h"
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "libavutil/log.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
@@ -165,7 +166,7 @@ static inline int dc1394_read_common(AVFormatContext *c, AVFormatParameters *ap,
ret = AVERROR(ENOMEM);
goto out;
}
- av_set_pts_info(vst, 64, 1, 1000);
+ avpriv_set_pts_info(vst, 64, 1, 1000);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_RAWVIDEO;
vst->codec->time_base.den = framerate.num;
diff --git a/libavdevice/oss_audio.c b/libavdevice/oss_audio.c
index 01d944a..308fc0d 100644
--- a/libavdevice/oss_audio.c
+++ b/libavdevice/oss_audio.c
@@ -40,6 +40,7 @@
#include "libavutil/opt.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#define AUDIO_BLOCK_SIZE 4096
@@ -225,7 +226,7 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap)
st->codec->sample_rate = s->sample_rate;
st->codec->channels = s->channels;
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
return 0;
}
diff --git a/libavdevice/pulse.c b/libavdevice/pulse.c
index 41f88b5..7f7c6dc 100644
--- a/libavdevice/pulse.c
+++ b/libavdevice/pulse.c
@@ -31,6 +31,7 @@
#include <pulse/error.h>
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "libavutil/opt.h"
#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
@@ -108,7 +109,7 @@ static av_cold int pulse_read_header(AVFormatContext *s,
st->codec->codec_id = codec_id;
st->codec->sample_rate = pd->sample_rate;
st->codec->channels = pd->channels;
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
pd->pts = AV_NOPTS_VALUE;
pd->frame_duration = (pd->frame_size * 1000000LL * 8) /
diff --git a/libavdevice/sndio_dec.c b/libavdevice/sndio_dec.c
index ca11661..cc74c38 100644
--- a/libavdevice/sndio_dec.c
+++ b/libavdevice/sndio_dec.c
@@ -23,6 +23,7 @@
#include <sndio.h>
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "libavutil/opt.h"
#include "sndio_common.h"
@@ -48,7 +49,7 @@ static av_cold int audio_read_header(AVFormatContext *s1,
st->codec->sample_rate = s->sample_rate;
st->codec->channels = s->channels;
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
return 0;
}
diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c
index d848e2b..bdfee2d 100644
--- a/libavdevice/v4l.c
+++ b/libavdevice/v4l.c
@@ -30,6 +30,7 @@
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "libavcodec/dsputil.h"
#include <unistd.h>
#include <fcntl.h>
@@ -100,7 +101,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
st = avformat_new_stream(s1, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
video_fd = open(s1->filename, O_RDWR);
if (video_fd < 0) {
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 372d090..0c61f46 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -30,6 +30,7 @@
#undef __STRICT_ANSI__ //workaround due to broken kernel headers
#include "config.h"
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
@@ -585,7 +586,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
res = AVERROR(ENOMEM);
goto out;
}
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
if (s->video_size && (res = av_parse_video_size(&s->width, &s->height, s->video_size)) < 0) {
av_log(s1, AV_LOG_ERROR, "Could not parse video size '%s'.\n", s->video_size);
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index 6f11914..b5baee3 100644
--- a/libavdevice/vfwcap.c
+++ b/libavdevice/vfwcap.c
@@ -20,6 +20,7 @@
*/
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
@@ -396,7 +397,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
}
- av_set_pts_info(st, 32, 1, 1000);
+ avpriv_set_pts_info(st, 32, 1, 1000);
ctx->mutex = CreateMutex(NULL, 0, NULL);
if(!ctx->mutex) {
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index 7874b81..5673e5e 100644
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@ -37,6 +37,7 @@
#include "config.h"
#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
@@ -198,7 +199,7 @@ x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
ret = AVERROR(ENOMEM);
goto out;
}
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
screen = DefaultScreen(dpy);
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index ba4eda3..6dc919e 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -30,6 +30,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
+#include "internal.h"
#define RIFF_TAG MKTAG('R', 'I', 'F', 'F')
#define FOURXMV_TAG MKTAG('4', 'X', 'M', 'V')
@@ -146,7 +147,7 @@ static int fourxm_read_header(AVFormatContext *s,
ret= AVERROR(ENOMEM);
goto fail;
}
- av_set_pts_info(st, 60, 1, fourxm->fps);
+ avpriv_set_pts_info(st, 60, 1, fourxm->fps);
fourxm->video_stream_index = st->index;
@@ -205,7 +206,7 @@ static int fourxm_read_header(AVFormatContext *s,
}
st->id = current_track;
- av_set_pts_info(st, 60, 1, fourxm->tracks[current_track].sample_rate);
+ avpriv_set_pts_info(st, 60, 1, fourxm->tracks[current_track].sample_rate);
fourxm->tracks[current_track].stream_index = st->index;
diff --git a/libavformat/aacdec.c b/libavformat/aacdec.c
index 4aa2d32..25c5910 100644
--- a/libavformat/aacdec.c
+++ b/libavformat/aacdec.c
@@ -22,6 +22,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "rawdec.h"
#include "id3v1.h"
@@ -76,7 +77,7 @@ static int adts_aac_read_header(AVFormatContext *s,
ff_id3v1_read(s);
//LCM of all possible ADTS sample rates
- av_set_pts_info(st, 64, 1, 28224000);
+ avpriv_set_pts_info(st, 64, 1, 28224000);
return 0;
}
diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c
index eff2698..dca9748 100644
--- a/libavformat/adxdec.c
+++ b/libavformat/adxdec.c
@@ -26,6 +26,7 @@
#include "libavutil/intreadwrite.h"
#include "libavcodec/adx.h"
#include "avformat.h"
+#include "internal.h"
#define BLOCK_SIZE 18
#define BLOCK_SAMPLES 32
@@ -95,7 +96,7 @@ static int adx_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = s->iformat->value;
- av_set_pts_info(st, 64, BLOCK_SAMPLES, avctx->sample_rate);
+ avpriv_set_pts_info(st, 64, BLOCK_SAMPLES, avctx->sample_rate);
return 0;
}
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 5d25a74..f54a7ff 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -22,6 +22,7 @@
#include "libavutil/intfloat_readwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
+#include "internal.h"
#include "pcm.h"
#include "aiff.h"
@@ -268,7 +269,7 @@ static int aiff_read_header(AVFormatContext *s,
got_sound:
/* Now positioned, get the sound data start and end */
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
st->start_time = 0;
st->duration = st->codec->frame_size ?
st->nb_frames * st->codec->frame_size : st->nb_frames;
diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c
index fbe1491..df43688 100644
--- a/libavformat/aiffenc.c
+++ b/libavformat/aiffenc.c
@@ -21,6 +21,7 @@
#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "aiff.h"
#include "avio_internal.h"
@@ -96,7 +97,7 @@ static int aiff_write_header(AVFormatContext *s)
avio_wb32(pb, 0); /* Data offset */
avio_wb32(pb, 0); /* Block-size (block align) */
- av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
+ avpriv_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
/* Data is starting here */
avio_flush(pb);
diff --git a/libavformat/amr.c b/libavformat/amr.c
index 0f62c7d..b52ac49 100644
--- a/libavformat/amr.c
+++ b/libavformat/amr.c
@@ -26,6 +26,7 @@ Only mono files are supported.
*/
#include "avformat.h"
+#include "internal.h"
static const char AMR_header [] = "#!AMR\n";
static const char AMRWB_header [] = "#!AMR-WB\n";
@@ -111,7 +112,7 @@ static int amr_read_header(AVFormatContext *s,
}
st->codec->channels = 1;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
return 0;
}
diff --git a/libavformat/anm.c b/libavformat/anm.c
index a89bf3e..00a36ab 100644
--- a/libavformat/anm.c
+++ b/libavformat/anm.c
@@ -26,6 +26,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
typedef struct {
int base_record;
@@ -128,7 +129,7 @@ static int read_header(AVFormatContext *s,
avio_skip(pb, 32); /* record_types */
st->nb_frames = avio_rl32(pb);
- av_set_pts_info(st, 64, 1, avio_rl16(pb));
+ avpriv_set_pts_info(st, 64, 1, avio_rl16(pb));
avio_skip(pb, 58);
/* color cycling and palette data */
diff --git a/libavformat/ape.c b/libavformat/ape.c
index b29e57b..a60626e 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -24,6 +24,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "apetag.h"
/* The earliest and latest file formats supported by this library */
@@ -330,7 +331,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
st->nb_frames = ape->totalframes;
st->start_time = 0;
st->duration = total_blocks / MAC_SUBFRAME_SIZE;
- av_set_pts_info(st, 64, MAC_SUBFRAME_SIZE, ape->samplerate);
+ avpriv_set_pts_info(st, 64, MAC_SUBFRAME_SIZE, ape->samplerate);
st->codec->extradata = av_malloc(APE_EXTRADATA_SIZE);
st->codec->extradata_size = APE_EXTRADATA_SIZE;
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 0245340..4c9c59d 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -28,6 +28,7 @@
#include "libavutil/mathematics.h"
#include "libavcodec/mpegaudio.h"
#include "avformat.h"
+#include "internal.h"
#include "avio_internal.h"
#include "riff.h"
#include "asf.h"
@@ -230,7 +231,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */
+ avpriv_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */
asf_st = av_mallocz(sizeof(ASFStream));
if (!asf_st)
return AVERROR(ENOMEM);
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 01f98d2..1cfc857 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
#include "asf.h"
#include "avio_internal.h"
@@ -321,7 +322,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
for(n=0;n<s->nb_streams;n++) {
enc = s->streams[n]->codec;
- av_set_pts_info(s->streams[n], 32, 1, 1000); /* 32 bit pts in ms */
+ avpriv_set_pts_info(s->streams[n], 32, 1, 1000); /* 32 bit pts in ms */
bit_rate += enc->bit_rate;
}
diff --git a/libavformat/assdec.c b/libavformat/assdec.c
index 6b9c3de..b100f2c 100644
--- a/libavformat/assdec.c
+++ b/libavformat/assdec.c
@@ -86,7 +86,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
st = avformat_new_stream(s, NULL);
if (!st)
return -1;
- av_set_pts_info(st, 64, 1, 100);
+ avpriv_set_pts_info(st, 64, 1, 100);
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
st->codec->codec_id= CODEC_ID_SSA;
diff --git a/libavformat/au.c b/libavformat/au.c
index 4f76773..c6fb8db 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -28,6 +28,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "avio_internal.h"
#include "pcm.h"
#include "riff.h"
@@ -159,7 +160,7 @@ static int au_read_header(AVFormatContext *s,
st->codec->codec_id = codec;
st->codec->channels = channels;
st->codec->sample_rate = rate;
- av_set_pts_info(st, 64, 1, rate);
+ avpriv_set_pts_info(st, 64, 1, rate);
return 0;
}
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 5276af1..367ba1e 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1540,18 +1540,14 @@ AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c);
AVProgram *av_new_program(AVFormatContext *s, int id);
+#if FF_API_SET_PTS_INFO
/**
- * Set the pts for a given stream. If the new values would be invalid
- * (<= 0), it leaves the AVStream unchanged.
- *
- * @param s stream
- * @param pts_wrap_bits number of bits effectively used by the pts
- * (used for wrap control, 33 is the value for MPEG)
- * @param pts_num numerator to convert to seconds (MPEG: 1)
- * @param pts_den denominator to convert to seconds (MPEG: 90000)
+ * @deprecated this function is not supposed to be called outside of lavf
*/
+attribute_deprecated
void av_set_pts_info(AVStream *s, int pts_wrap_bits,
unsigned int pts_num, unsigned int pts_den);
+#endif
#define AVSEEK_FLAG_BACKWARD 1 ///< seek backward
#define AVSEEK_FLAG_BYTE 2 ///< seeking based on position in bytes
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index ee42655..ad35995 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -25,6 +25,7 @@
#include "libavutil/dict.h"
#include "libavutil/avstring.h"
#include "avformat.h"
+#include "internal.h"
#include "avi.h"
#include "dv.h"
#include "riff.h"
@@ -502,7 +503,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
ast->scale = 1;
}
}
- av_set_pts_info(st, 64, ast->scale, ast->rate);
+ avpriv_set_pts_info(st, 64, ast->scale, ast->rate);
ast->cum_len=avio_rl32(pb); /* start */
st->nb_frames = avio_rl32(pb);
@@ -784,7 +785,7 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt) {
*st->codec = *ast->sub_ctx->streams[0]->codec;
ast->sub_ctx->streams[0]->codec->extradata = NULL;
time_base = ast->sub_ctx->streams[0]->time_base;
- av_set_pts_info(st, 64, time_base.num, time_base.den);
+ avpriv_set_pts_info(st, 64, time_base.num, time_base.den);
}
ast->sub_buffer = pkt->data;
memset(pkt, 0, sizeof(*pkt));
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index b4521cd..2a23c21 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avformat.h"
+#include "internal.h"
#include "avi.h"
#include "avio_internal.h"
#include "riff.h"
@@ -256,7 +257,7 @@ static int avi_write_header(AVFormatContext *s)
avio_wl32(pb, au_scale); /* scale */
avio_wl32(pb, au_byterate); /* rate */
- av_set_pts_info(s->streams[i], 64, au_scale, au_byterate);
+ avpriv_set_pts_info(s->streams[i], 64, au_scale, au_byterate);
avio_wl32(pb, 0); /* start */
avist->frames_hdr_strm = avio_tell(pb); /* remember this offset to fill later */
diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
index 01fe175..9449c1b 100644
--- a/libavformat/avisynth.c
+++ b/libavformat/avisynth.c
@@ -20,6 +20,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
#include <windows.h>
@@ -137,7 +138,7 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->stream_codec_tag = stream->info.fccHandler;
- av_set_pts_info(st, 64, info.dwScale, info.dwRate);
+ avpriv_set_pts_info(st, 64, info.dwScale, info.dwRate);
st->start_time = stream->info.dwStart;
}
}
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index d30f873..7705fcb 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -29,6 +29,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "libavcodec/bethsoftvideo.h"
typedef struct BVID_DemuxContext
@@ -73,7 +74,7 @@ static int vid_read_header(AVFormatContext *s,
stream = avformat_new_stream(s, NULL);
if (!stream)
return AVERROR(ENOMEM);
- av_set_pts_info(stream, 32, 1, 60); // 16 ms increments, i.e. 60 fps
+ avpriv_set_pts_info(stream, 32, 1, 60); // 16 ms increments, i.e. 60 fps
stream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
stream->codec->codec_id = CODEC_ID_BETHSOFTVID;
stream->codec->width = avio_rl16(pb);
diff --git a/libavformat/bfi.c b/libavformat/bfi.c
index 647dd54..bb02e85 100644
--- a/libavformat/bfi.c
+++ b/libavformat/bfi.c
@@ -28,6 +28,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
typedef struct BFIContext {
int nframes;
@@ -86,7 +87,7 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap)
astream->codec->sample_rate = avio_rl32(pb);
/* Set up the video codec... */
- av_set_pts_info(vstream, 32, 1, fps);
+ avpriv_set_pts_info(vstream, 32, 1, fps);
vstream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vstream->codec->codec_id = CODEC_ID_BFI;
vstream->codec->pix_fmt = PIX_FMT_PAL8;
@@ -99,7 +100,7 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap)
astream->codec->bit_rate =
astream->codec->sample_rate * astream->codec->bits_per_coded_sample;
avio_seek(pb, chunk_header - 3, SEEK_SET);
- av_set_pts_info(astream, 64, 1, astream->codec->sample_rate);
+ avpriv_set_pts_info(astream, 64, 1, astream->codec->sample_rate);
return 0;
}
diff --git a/libavformat/bink.c b/libavformat/bink.c
index ea04afd..ecf6905 100644
--- a/libavformat/bink.c
+++ b/libavformat/bink.c
@@ -30,6 +30,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
enum BinkAudFlags {
BINK_AUD_16BITS = 0x4000, ///< prefer 16-bit output
@@ -109,7 +110,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
av_log(s, AV_LOG_ERROR, "invalid header: invalid fps (%d/%d)\n", fps_num, fps_den);
return AVERROR(EIO);
}
- av_set_pts_info(vst, 64, fps_den, fps_num);
+ avpriv_set_pts_info(vst, 64, fps_den, fps_num);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_BINKVIDEO;
@@ -136,7 +137,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codec->codec_tag = 0;
ast->codec->sample_rate = avio_rl16(pb);
- av_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
+ avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
flags = avio_rl16(pb);
ast->codec->codec_id = flags & BINK_AUD_USEDCT ?
CODEC_ID_BINKAUDIO_DCT : CODEC_ID_BINKAUDIO_RDFT;
diff --git a/libavformat/bmv.c b/libavformat/bmv.c
index fb41712..1077efa 100644
--- a/libavformat/bmv.c
+++ b/libavformat/bmv.c
@@ -20,6 +20,7 @@
*/
#include "avformat.h"
+#include "internal.h"
enum BMVFlags {
BMV_NOP = 0,
@@ -50,7 +51,7 @@ static int bmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->width = 640;
st->codec->height = 429;
st->codec->pix_fmt = PIX_FMT_PAL8;
- av_set_pts_info(st, 16, 1, 12);
+ avpriv_set_pts_info(st, 16, 1, 12);
ast = avformat_new_stream(s, 0);
if (!ast)
return AVERROR(ENOMEM);
@@ -58,7 +59,7 @@ static int bmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
ast->codec->codec_id = CODEC_ID_BMV_AUDIO;
ast->codec->channels = 2;
ast->codec->sample_rate = 22050;
- av_set_pts_info(ast, 16, 1, 22050);
+ avpriv_set_pts_info(ast, 16, 1, 22050);
c->get_next = 1;
c->audio_pos = 0;
diff --git a/libavformat/c93.c b/libavformat/c93.c
index a47c301..d82086d 100644
--- a/libavformat/c93.c
+++ b/libavformat/c93.c
@@ -20,6 +20,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "voc.h"
#include "libavutil/intreadwrite.h"
@@ -89,7 +90,7 @@ static int read_header(AVFormatContext *s,
video->codec->height = 192;
/* 4:3 320x200 with 8 empty lines */
video->sample_aspect_ratio = (AVRational) { 5, 6 };
- av_set_pts_info(video, 64, 2, 25);
+ avpriv_set_pts_info(video, 64, 2, 25);
video->nb_frames = framecount;
video->duration = framecount;
video->start_time = 0;
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index b8c378a..36d7ad4 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -26,6 +26,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
#include "isom.h"
#include "libavutil/intreadwrite.h"
@@ -287,7 +288,7 @@ static int read_header(AVFormatContext *s,
return AVERROR_INVALIDDATA;
}
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
st->start_time = 0;
/* position the stream at the start of data */
diff --git a/libavformat/cdg.c b/libavformat/cdg.c
index b6caa51..0980df7 100644
--- a/libavformat/cdg.c
+++ b/libavformat/cdg.c
@@ -20,6 +20,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#define CDG_PACKET_SIZE 24
#define CDG_COMMAND 0x09
@@ -38,7 +39,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
vst->codec->codec_id = CODEC_ID_CDGRAPHICS;
/// 75 sectors/sec * 4 packets/sector = 300 packets/sec
- av_set_pts_info(vst, 32, 1, 300);
+ avpriv_set_pts_info(vst, 32, 1, 300);
ret = avio_size(s->pb);
if (ret > 0)
diff --git a/libavformat/dfa.c b/libavformat/dfa.c
index 7b90ba7..ac49b61 100644
--- a/libavformat/dfa.c
+++ b/libavformat/dfa.c
@@ -21,6 +21,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
static int dfa_probe(AVProbeData *p)
{
@@ -58,7 +59,7 @@ static int dfa_read_header(AVFormatContext *s,
av_log(s, AV_LOG_WARNING, "Zero FPS reported, defaulting to 10\n");
mspf = 100;
}
- av_set_pts_info(st, 24, mspf, 1000);
+ avpriv_set_pts_info(st, 24, mspf, 1000);
avio_skip(pb, 128 - 16); // padding
st->duration = frames;
diff --git a/libavformat/dsicin.c b/libavformat/dsicin.c
index 5f02f79..801ca6a 100644
--- a/libavformat/dsicin.c
+++ b/libavformat/dsicin.c
@@ -26,6 +26,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
typedef struct CinFileHeader {
@@ -111,7 +112,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 32, 1, 12);
+ avpriv_set_pts_info(st, 32, 1, 12);
cin->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_DSICINVIDEO;
@@ -124,7 +125,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 32, 1, 22050);
+ avpriv_set_pts_info(st, 32, 1, 22050);
cin->audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_DSICINAUDIO;
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 2182375..805f252 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -30,6 +30,7 @@
*/
#include <time.h>
#include "avformat.h"
+#include "internal.h"
#include "libavcodec/dvdata.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
@@ -214,7 +215,7 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame)
c->ast[i] = avformat_new_stream(c->fctx, NULL);
if (!c->ast[i])
break;
- av_set_pts_info(c->ast[i], 64, 1, 30000);
+ avpriv_set_pts_info(c->ast[i], 64, 1, 30000);
c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
c->ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE;
@@ -244,7 +245,7 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame)
if (c->sys) {
avctx = c->vst->codec;
- av_set_pts_info(c->vst, 64, c->sys->time_base.num,
+ avpriv_set_pts_info(c->vst, 64, c->sys->time_base.num,
c->sys->time_base.den);
avctx->time_base= c->sys->time_base;
if (!avctx->width){
diff --git a/libavformat/dxa.c b/libavformat/dxa.c
index e35740e..0cc803d 100644
--- a/libavformat/dxa.c
+++ b/libavformat/dxa.c
@@ -21,6 +21,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
#define DXA_EXTRA_SIZE 9
@@ -127,7 +128,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->width = w;
st->codec->height = h;
av_reduce(&den, &num, den, num, (1UL<<31)-1);
- av_set_pts_info(st, 33, num, den);
+ avpriv_set_pts_info(st, 33, num, den);
/* flags & 0x80 means that image is interlaced,
* flags & 0x40 means that image has double height
* either way set true height
diff --git a/libavformat/eacdata.c b/libavformat/eacdata.c
index 7d6da93..8fe144e 100644
--- a/libavformat/eacdata.c
+++ b/libavformat/eacdata.c
@@ -29,6 +29,7 @@
*/
#include "avformat.h"
+#include "internal.h"
typedef struct {
unsigned int channels;
@@ -72,7 +73,7 @@ static int cdata_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->codec_id = CODEC_ID_ADPCM_EA_XAS;
st->codec->channels = cdata->channels;
st->codec->sample_rate = sample_rate;
- av_set_pts_info(st, 64, 1, sample_rate);
+ avpriv_set_pts_info(st, 64, 1, sample_rate);
cdata->audio_pts = 0;
return 0;
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index c236d2f..0facc8a 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -27,6 +27,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define SCHl_TAG MKTAG('S', 'C', 'H', 'l')
#define SEAD_TAG MKTAG('S', 'E', 'A', 'D') /* Sxxx header */
@@ -438,7 +439,7 @@ static int ea_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 33, 1, ea->sample_rate);
+ avpriv_set_pts_info(st, 33, 1, ea->sample_rate);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = ea->audio_codec;
st->codec->codec_tag = 0; /* no tag */
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 61b6a2d..1145767 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -22,6 +22,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "ffm.h"
#if CONFIG_AVSERVER
#include <unistd.h>
@@ -294,7 +295,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!st)
goto fail;
- av_set_pts_info(st, 64, 1, 1000000);
+ avpriv_set_pts_info(st, 64, 1, 1000000);
codec = st->codec;
/* generic info */
diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c
index 4bfae69..af32e71 100644
--- a/libavformat/ffmenc.c
+++ b/libavformat/ffmenc.c
@@ -22,6 +22,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "ffm.h"
static void flush_packet(AVFormatContext *s)
@@ -107,7 +108,7 @@ static int ffm_write_header(AVFormatContext *s)
/* list of streams */
for(i=0;i<s->nb_streams;i++) {
st = s->streams[i];
- av_set_pts_info(st, 64, 1, 1000000);
+ avpriv_set_pts_info(st, 64, 1, 1000000);
codec = st->codec;
/* generic info */
diff --git a/libavformat/filmstripdec.c b/libavformat/filmstripdec.c
index 8028d04..648fb4f 100644
--- a/libavformat/filmstripdec.c
+++ b/libavformat/filmstripdec.c
@@ -26,6 +26,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define RAND_TAG MKBETAG('R','a','n','d')
@@ -67,7 +68,7 @@ static int read_header(AVFormatContext *s,
st->codec->width = avio_rb16(pb);
st->codec->height = avio_rb16(pb);
film->leading = avio_rb16(pb);
- av_set_pts_info(st, 64, 1, avio_rb16(pb));
+ avpriv_set_pts_info(st, 64, 1, avio_rb16(pb));
avio_seek(pb, 0, SEEK_SET);
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index 4191285..c5a6ac9 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -21,6 +21,7 @@
#include "libavcodec/flac.h"
#include "avformat.h"
+#include "internal.h"
#include "rawdec.h"
#include "oggdec.h"
#include "vorbiscomment.h"
@@ -91,7 +92,7 @@ static int flac_read_header(AVFormatContext *s,
/* set time base and duration */
if (si.samplerate > 0) {
- av_set_pts_info(st, 64, 1, si.samplerate);
+ avpriv_set_pts_info(st, 64, 1, si.samplerate);
if (si.samples > 0)
st->duration = si.samples;
}
diff --git a/libavformat/flic.c b/libavformat/flic.c
index 39c7444..7edc46e 100644
--- a/libavformat/flic.c
+++ b/libavformat/flic.c
@@ -34,6 +34,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/audioconvert.h"
#include "avformat.h"
+#include "internal.h"
#define FLIC_FILE_MAGIC_1 0xAF11
#define FLIC_FILE_MAGIC_2 0xAF12
@@ -167,10 +168,10 @@ static int flic_read_header(AVFormatContext *s,
/* Since the header information is incorrect we have to figure out the
* framerate using block_align and the fact that the audio is 22050 Hz.
* We usually have two cases: 2205 -> 10 fps and 1470 -> 15 fps */
- av_set_pts_info(st, 64, ast->codec->block_align, FLIC_TFTD_SAMPLE_RATE);
- av_set_pts_info(ast, 64, 1, FLIC_TFTD_SAMPLE_RATE);
+ avpriv_set_pts_info(st, 64, ast->codec->block_align, FLIC_TFTD_SAMPLE_RATE);
+ avpriv_set_pts_info(ast, 64, 1, FLIC_TFTD_SAMPLE_RATE);
} else if (AV_RL16(&header[0x10]) == FLIC_CHUNK_MAGIC_1) {
- av_set_pts_info(st, 64, FLIC_MC_SPEED, 70);
+ avpriv_set_pts_info(st, 64, FLIC_MC_SPEED, 70);
/* rewind the stream since the first chunk is at offset 12 */
avio_seek(pb, 12, SEEK_SET);
@@ -182,10 +183,10 @@ static int flic_read_header(AVFormatContext *s,
memcpy(st->codec->extradata, header, 12);
} else if (magic_number == FLIC_FILE_MAGIC_1) {
- av_set_pts_info(st, 64, speed, 70);
+ avpriv_set_pts_info(st, 64, speed, 70);
} else if ((magic_number == FLIC_FILE_MAGIC_2) ||
(magic_number == FLIC_FILE_MAGIC_3)) {
- av_set_pts_info(st, 64, speed, 1000);
+ avpriv_set_pts_info(st, 64, speed, 1000);
} else {
av_log(s, AV_LOG_INFO, "Invalid or unsupported magic chunk in file\n");
return AVERROR_INVALIDDATA;
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 1459850..5d19dd8 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -31,6 +31,7 @@
#include "libavcodec/bytestream.h"
#include "libavcodec/mpeg4audio.h"
#include "avformat.h"
+#include "internal.h"
#include "avio_internal.h"
#include "flv.h"
@@ -360,7 +361,7 @@ static AVStream *create_stream(AVFormatContext *s, int is_audio){
return NULL;
st->id = is_audio;
st->codec->codec_type = is_audio ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO;
- av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */
+ avpriv_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */
return st;
}
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 80ddcd8..d349ffd 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -199,7 +199,7 @@ static int flv_write_header(AVFormatContext *s)
if(get_audio_flags(enc)<0)
return -1;
}
- av_set_pts_info(s->streams[i], 32, 1, 1000); /* 32 bit pts in ms */
+ avpriv_set_pts_info(s->streams[i], 32, 1, 1000); /* 32 bit pts in ms */
sc = av_mallocz(sizeof(FLVStreamContext));
if (!sc)
diff --git a/libavformat/gsmdec.c b/libavformat/gsmdec.c
index 8c73c7b..2360887 100644
--- a/libavformat/gsmdec.c
+++ b/libavformat/gsmdec.c
@@ -22,6 +22,7 @@
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "avformat.h"
+#include "internal.h"
#define GSM_BLOCK_SIZE 33
#define GSM_BLOCK_SAMPLES 160
@@ -67,7 +68,7 @@ static int gsm_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->block_align = GSM_BLOCK_SIZE;
st->codec->bit_rate = GSM_BLOCK_SIZE * 8 * c->sample_rate / GSM_BLOCK_SAMPLES;
- av_set_pts_info(st, 64, GSM_BLOCK_SAMPLES, GSM_SAMPLE_RATE);
+ avpriv_set_pts_info(st, 64, GSM_BLOCK_SAMPLES, GSM_SAMPLE_RATE);
return 0;
}
diff --git a/libavformat/gxf.c b/libavformat/gxf.c
index 473f33a..ebc4eea 100644
--- a/libavformat/gxf.c
+++ b/libavformat/gxf.c
@@ -362,7 +362,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
main_timebase = (AVRational){1001, 60000};
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->streams[i];
- av_set_pts_info(st, 32, main_timebase.num, main_timebase.den);
+ avpriv_set_pts_info(st, 32, main_timebase.num, main_timebase.den);
}
return 0;
}
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c
index 89969b2..69650c6 100644
--- a/libavformat/gxfenc.c
+++ b/libavformat/gxfenc.c
@@ -22,6 +22,7 @@
#include "libavutil/intfloat_readwrite.h"
#include "libavutil/mathematics.h"
#include "avformat.h"
+#include "internal.h"
#include "gxf.h"
#include "riff.h"
#include "audiointerleave.h"
@@ -676,7 +677,7 @@ static int gxf_write_header(AVFormatContext *s)
}
sc->track_type = 2;
sc->sample_rate = st->codec->sample_rate;
- av_set_pts_info(st, 64, 1, sc->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, sc->sample_rate);
sc->sample_size = 16;
sc->frame_rate_index = -2;
sc->lines_index = -2;
@@ -706,7 +707,7 @@ static int gxf_write_header(AVFormatContext *s)
"gxf muxer only accepts PAL or NTSC resolutions currently\n");
return -1;
}
- av_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den);
+ avpriv_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den);
if (gxf_find_lines_index(st) < 0)
sc->lines_index = -1;
sc->sample_size = st->codec->bit_rate;
diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index 64bc535..b26f2aa 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -70,6 +70,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define HUFFMAN_TABLE_SIZE (64 * 1024)
#define IDCIN_FPS 14
@@ -156,7 +157,7 @@ static int idcin_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 33, 1, IDCIN_FPS);
+ avpriv_set_pts_info(st, 33, 1, IDCIN_FPS);
idcin->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_IDCIN;
@@ -177,7 +178,7 @@ static int idcin_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 33, 1, IDCIN_FPS);
+ avpriv_set_pts_info(st, 33, 1, IDCIN_FPS);
idcin->audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_tag = 1;
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c
index f1c1acc..5e347b1 100644
--- a/libavformat/idroqdec.c
+++ b/libavformat/idroqdec.c
@@ -29,6 +29,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define RoQ_MAGIC_NUMBER 0x1084
#define RoQ_CHUNK_PREAMBLE_SIZE 8
@@ -87,7 +88,7 @@ static int roq_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 63, 1, framerate);
+ avpriv_set_pts_info(st, 63, 1, framerate);
roq->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_ROQ;
@@ -169,7 +170,7 @@ static int roq_read_packet(AVFormatContext *s,
AVStream *st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE);
+ avpriv_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE);
roq->audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_ROQ_DPCM;
diff --git a/libavformat/iff.c b/libavformat/iff.c
index e621373..b895cf2 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -32,6 +32,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
+#include "internal.h"
#define ID_8SVX MKTAG('8','S','V','X')
#define ID_VHDR MKTAG('V','H','D','R')
@@ -216,7 +217,7 @@ static int iff_read_header(AVFormatContext *s,
switch(st->codec->codec_type) {
case AVMEDIA_TYPE_AUDIO:
- av_set_pts_info(st, 32, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate);
switch(compression) {
case COMP_NONE:
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 547f23f..898e6a4 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -250,7 +250,7 @@ static int read_header(AVFormatContext *s1, AVFormatParameters *ap)
st->need_parsing = AVSTREAM_PARSE_FULL;
}
- av_set_pts_info(st, 60, framerate.den, framerate.num);
+ avpriv_set_pts_info(st, 60, framerate.den, framerate.num);
if (width && height) {
st->codec->width = width;
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 0d8bbe7..4573668 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -286,4 +286,17 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index,
int flags, int64_t *ts_ret,
int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t ));
+/**
+ * Set the pts for a given stream. If the new values would be invalid
+ * (<= 0), it leaves the AVStream unchanged.
+ *
+ * @param s stream
+ * @param pts_wrap_bits number of bits effectively used by the pts
+ * (used for wrap control, 33 is the value for MPEG)
+ * @param pts_num numerator to convert to seconds (MPEG: 1)
+ * @param pts_den denominator to convert to seconds (MPEG: 90000)
+ */
+void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits,
+ unsigned int pts_num, unsigned int pts_den);
+
#endif /* AVFORMAT_INTERNAL_H */
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index 396742d..4bd3580 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -34,6 +34,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define CHUNK_PREAMBLE_SIZE 4
#define OPCODE_PREAMBLE_SIZE 4
@@ -562,7 +563,7 @@ static int ipmovie_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 63, 1, 1000000);
+ avpriv_set_pts_info(st, 63, 1, 1000000);
ipmovie->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_INTERPLAY_VIDEO;
@@ -575,7 +576,7 @@ static int ipmovie_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate);
+ avpriv_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate);
ipmovie->audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = ipmovie->audio_type;
diff --git a/libavformat/iss.c b/libavformat/iss.c
index 845e07b..ec6509c 100644
--- a/libavformat/iss.c
+++ b/libavformat/iss.c
@@ -27,6 +27,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "libavutil/avstring.h"
#define ISS_SIG "IMA_ADPCM_Sound"
@@ -101,7 +102,7 @@ static av_cold int iss_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->bit_rate = st->codec->channels * st->codec->sample_rate
* st->codec->bits_per_coded_sample;
st->codec->block_align = iss->packet_size;
- av_set_pts_info(st, 32, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate);
return 0;
}
diff --git a/libavformat/iv8.c b/libavformat/iv8.c
index d036636..78f71e8 100644
--- a/libavformat/iv8.c
+++ b/libavformat/iv8.c
@@ -19,6 +19,7 @@
*/
#include "avformat.h"
+#include "internal.h"
static int probe(AVProbeData *p)
@@ -47,7 +48,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_MPEG4;
st->need_parsing = AVSTREAM_PARSE_FULL;
- av_set_pts_info(st, 64, 1, 90000);
+ avpriv_set_pts_info(st, 64, 1, 90000);
return 0;
diff --git a/libavformat/ivfdec.c b/libavformat/ivfdec.c
index 52a370e..03f7995 100644
--- a/libavformat/ivfdec.c
+++ b/libavformat/ivfdec.c
@@ -19,6 +19,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
#include "libavutil/intreadwrite.h"
@@ -61,7 +62,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
return AVERROR_INVALIDDATA;
}
- av_set_pts_info(st, 64, time_base.num, time_base.den);
+ avpriv_set_pts_info(st, 64, time_base.num, time_base.den);
return 0;
}
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c
index 42a4dbf..c24b0c2 100644
--- a/libavformat/jvdec.c
+++ b/libavformat/jvdec.c
@@ -27,6 +27,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define JV_PREAMBLE_SIZE 5
@@ -81,7 +82,7 @@ static int read_header(AVFormatContext *s,
vst->codec->height = avio_rl16(pb);
vst->nb_frames =
ast->nb_index_entries = avio_rl16(pb);
- av_set_pts_info(vst, 64, avio_rl16(pb), 1000);
+ avpriv_set_pts_info(vst, 64, avio_rl16(pb), 1000);
avio_skip(pb, 4);
@@ -90,7 +91,7 @@ static int read_header(AVFormatContext *s,
ast->codec->codec_tag = 0; /* no fourcc */
ast->codec->sample_rate = avio_rl16(pb);
ast->codec->channels = 1;
- av_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
+ avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
avio_skip(pb, 10);
diff --git a/libavformat/libnut.c b/libavformat/libnut.c
index fbf9f2a..56e8bfc 100644
--- a/libavformat/libnut.c
+++ b/libavformat/libnut.c
@@ -26,6 +26,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
#include <libnut.h>
@@ -92,7 +93,7 @@ static int nut_write_header(AVFormatContext * avf) {
for (j = 0; j < s[i].fourcc_len; j++) s[i].fourcc[j] = (fourcc >> (j*8)) & 0xFF;
ff_parse_specific_params(codec, &num, &ssize, &denom);
- av_set_pts_info(avf->streams[i], 60, denom, num);
+ avpriv_set_pts_info(avf->streams[i], 60, denom, num);
s[i].time_base.num = denom;
s[i].time_base.den = num;
@@ -226,7 +227,7 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
memcpy(st->codec->extradata, s[i].codec_specific, st->codec->extradata_size);
}
- av_set_pts_info(avf->streams[i], 60, s[i].time_base.num, s[i].time_base.den);
+ avpriv_set_pts_info(avf->streams[i], 60, s[i].time_base.num, s[i].time_base.den);
st->start_time = 0;
st->duration = s[i].max_pts;
diff --git a/libavformat/lmlm4.c b/libavformat/lmlm4.c
index db3bf28..5f26c4b 100644
--- a/libavformat/lmlm4.c
+++ b/libavformat/lmlm4.c
@@ -24,6 +24,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define LMLM4_I_FRAME 0x00
#define LMLM4_P_FRAME 0x01
@@ -65,7 +66,7 @@ static int lmlm4_read_header(AVFormatContext *s, AVFormatParameters *ap) {
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_MPEG4;
st->need_parsing = AVSTREAM_PARSE_HEADERS;
- av_set_pts_info(st, 64, 1001, 30000);
+ avpriv_set_pts_info(st, 64, 1001, 30000);
if (!(st = avformat_new_stream(s, NULL)))
return AVERROR(ENOMEM);
diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
index cfa4f97..b3afa7e 100644
--- a/libavformat/lxfdec.c
+++ b/libavformat/lxfdec.c
@@ -21,6 +21,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
#define LXF_PACKET_HEADER_SIZE 60
@@ -174,14 +175,14 @@ static int get_packet_header(AVFormatContext *s, uint8_t *header, uint32_t *form
//use audio packet size to determine video standard
//for NTSC we have one 8008-sample audio frame per five video frames
if (samples == LXF_SAMPLERATE * 5005 / 30000) {
- av_set_pts_info(s->streams[0], 64, 1001, 30000);
+ avpriv_set_pts_info(s->streams[0], 64, 1001, 30000);
} else {
//assume PAL, but warn if we don't have 1920 samples
if (samples != LXF_SAMPLERATE / 25)
av_log(s, AV_LOG_WARNING,
"video doesn't seem to be PAL or NTSC. guessing PAL\n");
- av_set_pts_info(s->streams[0], 64, 1, 25);
+ avpriv_set_pts_info(s->streams[0], 64, 1, 25);
}
//TODO: warning if track mask != (1 << channels) - 1?
@@ -250,7 +251,7 @@ static int lxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->sample_rate = LXF_SAMPLERATE;
st->codec->channels = lxf->channels;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
}
if (format == 1) {
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index b136bba..6fdad8b 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1506,7 +1506,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (track->time_scale < 0.01)
track->time_scale = 1.0;
- av_set_pts_info(st, 64, matroska->time_scale*track->time_scale, 1000*1000*1000); /* 64 bit pts in ns */
+ avpriv_set_pts_info(st, 64, matroska->time_scale*track->time_scale, 1000*1000*1000); /* 64 bit pts in ns */
st->codec->codec_id = codec_id;
st->start_time = 0;
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 0667947..b8c73bf 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -20,6 +20,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
#include "isom.h"
#include "matroska.h"
@@ -662,7 +663,7 @@ static int mkv_write_tracks(AVFormatContext *s)
end_ebml_master(pb, track);
// ms precision is the de-facto standard timescale for mkv files
- av_set_pts_info(st, 64, 1, 1000);
+ avpriv_set_pts_info(st, 64, 1, 1000);
}
end_ebml_master(pb, tracks);
return 0;
diff --git a/libavformat/mm.c b/libavformat/mm.c
index dc4ea71..341cf26 100644
--- a/libavformat/mm.c
+++ b/libavformat/mm.c
@@ -33,6 +33,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define MM_PREAMBLE_SIZE 6
@@ -113,7 +114,7 @@ static int read_header(AVFormatContext *s,
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = width;
st->codec->height = height;
- av_set_pts_info(st, 64, 1, frame_rate);
+ avpriv_set_pts_info(st, 64, 1, frame_rate);
/* audio stream */
if (length == MM_HEADER_LEN_AV) {
@@ -125,7 +126,7 @@ static int read_header(AVFormatContext *s,
st->codec->codec_id = CODEC_ID_PCM_U8;
st->codec->channels = 1;
st->codec->sample_rate = 8000;
- av_set_pts_info(st, 64, 1, 8000); /* 8000 hz */
+ avpriv_set_pts_info(st, 64, 1, 8000); /* 8000 hz */
}
mm->audio_pts = 0;
diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index 4028a61..8e4f2de 100644
--- a/libavformat/mmf.c
+++ b/libavformat/mmf.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avformat.h"
+#include "internal.h"
#include "avio_internal.h"
#include "pcm.h"
#include "riff.h"
@@ -100,7 +101,7 @@ static int mmf_write_header(AVFormatContext *s)
mmf->awapos = ff_start_tag(pb, "Awa\x01");
- av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
+ avpriv_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
avio_flush(pb);
@@ -252,7 +253,7 @@ static int mmf_read_header(AVFormatContext *s,
st->codec->bits_per_coded_sample = 4;
st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
return 0;
}
diff --git a/libavformat/mov.c b/libavformat/mov.c
index c883de3..9f45441 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -31,6 +31,7 @@
#include "libavutil/avstring.h"
#include "libavutil/dict.h"
#include "avformat.h"
+#include "internal.h"
#include "avio_internal.h"
#include "riff.h"
#include "isom.h"
@@ -1827,7 +1828,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
sc->time_scale = 1;
}
- av_set_pts_info(st, 64, 1, sc->time_scale);
+ avpriv_set_pts_info(st, 64, 1, sc->time_scale);
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
!st->codec->frame_size && sc->stts_count == 1) {
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b7314dc..a741c4b 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2258,7 +2258,7 @@ static int mov_write_header(AVFormatContext *s)
if (!track->height)
track->height = st->codec->height;
- av_set_pts_info(st, 64, 1, track->timescale);
+ avpriv_set_pts_info(st, 64, 1, track->timescale);
}
mov_write_mdat_tag(pb, mov);
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 9011f9f..185d7b8 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -24,6 +24,7 @@
#include "libavutil/dict.h"
#include "libavutil/mathematics.h"
#include "avformat.h"
+#include "internal.h"
#include "id3v2.h"
#include "id3v1.h"
#include "libavcodec/mpegaudiodecheader.h"
@@ -147,7 +148,7 @@ static int mp3_read_header(AVFormatContext *s,
st->start_time = 0;
// lcm of all mp3 sample rates
- av_set_pts_info(st, 64, 1, 14112000);
+ avpriv_set_pts_info(st, 64, 1, 14112000);
off = avio_tell(s->pb);
diff --git a/libavformat/mpc.c b/libavformat/mpc.c
index a67d9ae..943121e 100644
--- a/libavformat/mpc.c
+++ b/libavformat/mpc.c
@@ -21,6 +21,7 @@
#include "libavcodec/get_bits.h"
#include "avformat.h"
+#include "internal.h"
#include "apetag.h"
#include "id3v1.h"
#include "libavutil/dict.h"
@@ -96,7 +97,7 @@ static int mpc_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE);
avio_read(s->pb, st->codec->extradata, 16);
st->codec->sample_rate = mpc_rate[st->codec->extradata[2] & 3];
- av_set_pts_info(st, 32, MPC_FRAMESIZE, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 32, MPC_FRAMESIZE, st->codec->sample_rate);
/* scan for seekpoints */
st->start_time = 0;
st->duration = c->fcount;
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index cd89f1c..d956049 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -22,6 +22,7 @@
#include "libavcodec/get_bits.h"
#include "libavcodec/unary.h"
#include "avformat.h"
+#include "internal.h"
#include "avio_internal.h"
/// Two-byte MPC tag
@@ -235,7 +236,7 @@ static int mpc8_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->channels = (st->codec->extradata[1] >> 4) + 1;
st->codec->sample_rate = mpc8_rate[st->codec->extradata[0] >> 5];
- av_set_pts_info(st, 32, 1152 << (st->codec->extradata[1]&3)*2, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 32, 1152 << (st->codec->extradata[1]&3)*2, st->codec->sample_rate);
st->duration = c->samples / (1152 << (st->codec->extradata[1]&3)*2);
size -= avio_tell(pb) - pos;
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index f824d6c..d537af6 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -25,6 +25,7 @@
#include "libavutil/opt.h"
#include "libavcodec/put_bits.h"
#include "avformat.h"
+#include "internal.h"
#include "mpeg.h"
#define MAX_PAYLOAD_SIZE 4096
@@ -336,7 +337,7 @@ static int mpeg_mux_init(AVFormatContext *ctx)
goto fail;
st->priv_data = stream;
- av_set_pts_info(st, 64, 1, 90000);
+ avpriv_set_pts_info(st, 64, 1, 90000);
switch(st->codec->codec_type) {
case AVMEDIA_TYPE_AUDIO:
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 71447fa..f7045ce 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -577,7 +577,7 @@ static void mpegts_find_stream_type(AVStream *st,
static int mpegts_set_stream_info(AVStream *st, PESContext *pes,
uint32_t stream_type, uint32_t prog_reg_desc)
{
- av_set_pts_info(st, 33, 1, 90000);
+ avpriv_set_pts_info(st, 33, 1, 90000);
st->priv_data = pes;
st->codec->codec_type = AVMEDIA_TYPE_DATA;
st->codec->codec_id = CODEC_ID_NONE;
@@ -612,7 +612,7 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes,
}
sub_st->id = pes->pid;
- av_set_pts_info(sub_st, 33, 1, 90000);
+ avpriv_set_pts_info(sub_st, 33, 1, 90000);
sub_st->priv_data = sub_pes;
sub_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
sub_st->codec->codec_id = CODEC_ID_AC3;
@@ -732,7 +732,7 @@ static int read_sl_header(PESContext *pes, SLConfigDescr *sl, const uint8_t *buf
if (cts != AV_NOPTS_VALUE)
pes->pts = cts;
- av_set_pts_info(pes->st, sl->timestamp_len, 1, sl->timestamp_res);
+ avpriv_set_pts_info(pes->st, sl->timestamp_len, 1, sl->timestamp_res);
return (get_bits_count(&gb) + 7) >> 3;
}
@@ -1920,7 +1920,7 @@ static int mpegts_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
goto fail;
- av_set_pts_info(st, 60, 1, 27000000);
+ avpriv_set_pts_info(st, 60, 1, 27000000);
st->codec->codec_type = AVMEDIA_TYPE_DATA;
st->codec->codec_id = CODEC_ID_MPEG2TS;
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index f28b719..c36c672 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -484,7 +484,7 @@ static int mpegts_write_header(AVFormatContext *s)
/* assign pids to each stream */
for(i = 0;i < s->nb_streams; i++) {
st = s->streams[i];
- av_set_pts_info(st, 33, 1, 90000);
+ avpriv_set_pts_info(st, 33, 1, 90000);
ts_st = av_mallocz(sizeof(MpegTSWriteStream));
if (!ts_st)
goto fail;
diff --git a/libavformat/msnwc_tcp.c b/libavformat/msnwc_tcp.c
index 0c12ea6..7e76c07 100644
--- a/libavformat/msnwc_tcp.c
+++ b/libavformat/msnwc_tcp.c
@@ -20,6 +20,7 @@
#include "libavcodec/bytestream.h"
#include "avformat.h"
+#include "internal.h"
#define HEADER_SIZE 24
@@ -84,7 +85,7 @@ static int msnwc_tcp_read_header(AVFormatContext *ctx, AVFormatParameters *ap)
codec->codec_id = CODEC_ID_MIMIC;
codec->codec_tag = MKTAG('M', 'L', '2', '0');
- av_set_pts_info(st, 32, 1, 1000);
+ avpriv_set_pts_info(st, 32, 1, 1000);
/* Some files start with "connected\r\n\r\n".
* So skip until we find the first byte of struct size */
diff --git a/libavformat/mtv.c b/libavformat/mtv.c
index 16e4c90..c3fb15c 100644
--- a/libavformat/mtv.c
+++ b/libavformat/mtv.c
@@ -27,6 +27,7 @@
#include "libavutil/bswap.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define MTV_ASUBCHUNK_DATA_SIZE 500
#define MTV_HEADER_SIZE 512
@@ -120,7 +121,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap)
if(!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 64, 1, mtv->video_fps);
+ avpriv_set_pts_info(st, 64, 1, mtv->video_fps);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_RAWVIDEO;
st->codec->pix_fmt = PIX_FMT_RGB565;
@@ -136,7 +137,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap)
if(!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE);
+ avpriv_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_MP3;
st->codec->bit_rate = mtv->audio_br;
diff --git a/libavformat/mvi.c b/libavformat/mvi.c
index 60a5bc8..4782aad 100644
--- a/libavformat/mvi.c
+++ b/libavformat/mvi.c
@@ -20,6 +20,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#define MVI_FRAC_BITS 10
@@ -76,14 +77,14 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
return AVERROR_INVALIDDATA;
}
- av_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
+ avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codec->codec_id = CODEC_ID_PCM_U8;
ast->codec->channels = 1;
ast->codec->bits_per_coded_sample = 8;
ast->codec->bit_rate = ast->codec->sample_rate * 8;
- av_set_pts_info(vst, 64, msecs_per_frame, 1000000);
+ avpriv_set_pts_info(vst, 64, msecs_per_frame, 1000000);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_MOTIONPIXELS;
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 95699a6..2a455d7 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -758,7 +758,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
if (st->duration == -1)
st->duration = AV_NOPTS_VALUE;
st->start_time = component->start_position;
- av_set_pts_info(st, 64, material_track->edit_rate.num, material_track->edit_rate.den);
+ avpriv_set_pts_info(st, 64, material_track->edit_rate.num, material_track->edit_rate.den);
if (!(source_track->sequence = mxf_resolve_strong_ref(mxf, &source_track->sequence_ref, Sequence))) {
av_log(mxf->fc, AV_LOG_ERROR, "could not resolve source track sequence strong ref\n");
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index d375e3f..a7eb432 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -1438,7 +1438,7 @@ static int mxf_write_header(AVFormatContext *s)
av_log(s, AV_LOG_ERROR, "unsupported video frame rate\n");
return -1;
}
- av_set_pts_info(st, 64, mxf->time_base.num, mxf->time_base.den);
+ avpriv_set_pts_info(st, 64, mxf->time_base.num, mxf->time_base.den);
if (s->oformat == &ff_mxf_d10_muxer) {
if (st->codec->bit_rate == 50000000)
if (mxf->time_base.den == 25) sc->index = 3;
@@ -1466,7 +1466,7 @@ static int mxf_write_header(AVFormatContext *s)
av_log(s, AV_LOG_ERROR, "only 48khz is implemented\n");
return -1;
}
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
if (s->oformat == &ff_mxf_d10_muxer) {
if (st->index != 1) {
av_log(s, AV_LOG_ERROR, "MXF D-10 only support one audio track\n");
diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index 2b69f72..a740364 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -22,6 +22,7 @@
#include "libavutil/intreadwrite.h"
#include "libavcodec/mjpeg.h"
#include "avformat.h"
+#include "internal.h"
#include "avio.h"
#define DEFAULT_PACKET_SIZE 1024
@@ -47,7 +48,7 @@ static int mxg_read_header(AVFormatContext *s, AVFormatParameters *ap)
return AVERROR(ENOMEM);
video_st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
video_st->codec->codec_id = CODEC_ID_MXPEG;
- av_set_pts_info(video_st, 64, 1, 1000000);
+ avpriv_set_pts_info(video_st, 64, 1, 1000000);
audio_st = avformat_new_stream(s, NULL);
if (!audio_st)
@@ -58,7 +59,7 @@ static int mxg_read_header(AVFormatContext *s, AVFormatParameters *ap)
audio_st->codec->sample_rate = 8000;
audio_st->codec->bits_per_coded_sample = 8;
audio_st->codec->block_align = 1;
- av_set_pts_info(audio_st, 64, 1, 1000000);
+ avpriv_set_pts_info(audio_st, 64, 1, 1000000);
mxg->soi_ptr = mxg->buffer_ptr = mxg->buffer = 0;
mxg->buffer_size = 0;
diff --git a/libavformat/ncdec.c b/libavformat/ncdec.c
index 5c2506e..ab1d302 100644
--- a/libavformat/ncdec.c
+++ b/libavformat/ncdec.c
@@ -22,6 +22,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define NC_VIDEO_FLAG 0x1A5
@@ -54,7 +55,7 @@ static int nc_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->codec_id = CODEC_ID_MPEG4;
st->need_parsing = AVSTREAM_PARSE_FULL;
- av_set_pts_info(st, 64, 1, 100);
+ avpriv_set_pts_info(st, 64, 1, 100);
return 0;
}
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index d0fac9a..18dfde2 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -21,6 +21,7 @@
#include "libavutil/mathematics.h"
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
#include "libavutil/dict.h"
@@ -457,7 +458,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->height = vheight;
st->codec->bits_per_coded_sample = 24; /* depth XXX */
- av_set_pts_info(st, 64, framerate.den, framerate.num);
+ avpriv_set_pts_info(st, 64, framerate.den, framerate.num);
st->start_time = 0;
st->duration = av_rescale(nsv->duration, framerate.num, 1000*framerate.den);
@@ -489,7 +490,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap)
st->need_parsing = AVSTREAM_PARSE_FULL; /* for PCM we will read a chunk later and put correct info */
/* set timebase to common denominator of ms and framerate */
- av_set_pts_info(st, 64, 1, framerate.num*1000);
+ avpriv_set_pts_info(st, 64, 1, framerate.num*1000);
st->start_time = 0;
st->duration = (int64_t)nsv->duration * framerate.num;
#endif
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index c41b4ce..9cec89e 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -374,7 +374,7 @@ static int decode_stream_header(NUTContext *nut){
return -1;
}
stc->time_base= &nut->time_base[stc->time_base_id];
- av_set_pts_info(s->streams[stream_id], 63, stc->time_base->num, stc->time_base->den);
+ avpriv_set_pts_info(s->streams[stream_id], 63, stc->time_base->num, stc->time_base->den);
return 0;
}
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index bde6ba2..ae1c2f1 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -603,7 +603,7 @@ static int nut_write_header(AVFormatContext *s){
AVRational time_base;
ff_parse_specific_params(st->codec, &time_base.den, &ssize, &time_base.num);
- av_set_pts_info(st, 64, time_base.num, time_base.den);
+ avpriv_set_pts_info(st, 64, time_base.num, time_base.den);
for(j=0; j<nut->time_base_count; j++){
if(!memcmp(&time_base, &nut->time_base[j], sizeof(AVRational))){
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index f9ab6b7..eede758 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -22,6 +22,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
typedef struct {
@@ -163,7 +164,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
vst->codec->bits_per_coded_sample = 10;
vst->sample_aspect_ratio = av_d2q(aspect * height / width, 10000);
vst->r_frame_rate = av_d2q(fps, 60000);
- av_set_pts_info(vst, 32, 1, 1000);
+ avpriv_set_pts_info(vst, 32, 1, 1000);
} else
ctx->v_id = -1;
@@ -179,7 +180,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
ast->codec->bit_rate = 2 * 2 * 44100 * 8;
ast->codec->block_align = 2 * 2;
ast->codec->bits_per_coded_sample = 16;
- av_set_pts_info(ast, 32, 1, 1000);
+ avpriv_set_pts_info(ast, 32, 1, 1000);
} else
ctx->a_id = -1;
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index f7513cf..c22f2be 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -178,7 +178,7 @@ static int ogg_new_stream(AVFormatContext *s, uint32_t serial, int new_avstream)
return AVERROR(ENOMEM);
st->id = idx;
- av_set_pts_info(st, 64, 1, 1000000);
+ avpriv_set_pts_info(st, 64, 1, 1000000);
}
return idx;
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 16a14d2..33aba87 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -323,9 +323,9 @@ static int ogg_write_header(AVFormatContext *s)
unsigned serial_num = i;
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
- av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
+ avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
if (st->codec->codec_id != CODEC_ID_VORBIS &&
st->codec->codec_id != CODEC_ID_THEORA &&
st->codec->codec_id != CODEC_ID_SPEEX &&
diff --git a/libavformat/oggparsecelt.c b/libavformat/oggparsecelt.c
index 6a0c308..5f07de4 100644
--- a/libavformat/oggparsecelt.c
+++ b/libavformat/oggparsecelt.c
@@ -23,6 +23,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "oggdec.h"
struct oggcelt_private {
@@ -71,7 +72,7 @@ static int celt_header(AVFormatContext *s, int idx)
st->codec->extradata = extradata;
st->codec->extradata_size = 2 * sizeof(uint32_t);
if (sample_rate)
- av_set_pts_info(st, 64, 1, sample_rate);
+ avpriv_set_pts_info(st, 64, 1, sample_rate);
priv->extra_headers_left = 1 + extra_headers;
os->private = priv;
AV_WL32(extradata + 0, overlap);
diff --git a/libavformat/oggparsedirac.c b/libavformat/oggparsedirac.c
index 9991d56..8d3a802 100644
--- a/libavformat/oggparsedirac.c
+++ b/libavformat/oggparsedirac.c
@@ -21,6 +21,7 @@
#include "libavcodec/get_bits.h"
#include "libavcodec/dirac.h"
#include "avformat.h"
+#include "internal.h"
#include "oggdec.h"
static int dirac_header(AVFormatContext *s, int idx)
@@ -42,7 +43,7 @@ static int dirac_header(AVFormatContext *s, int idx)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_DIRAC;
// dirac in ogg always stores timestamps as though the video were interlaced
- av_set_pts_info(st, 64, st->codec->time_base.num, 2*st->codec->time_base.den);
+ avpriv_set_pts_info(st, 64, st->codec->time_base.num, 2*st->codec->time_base.den);
return 1;
}
@@ -79,7 +80,7 @@ static int old_dirac_header(AVFormatContext *s, int idx)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_DIRAC;
- av_set_pts_info(st, 64, AV_RB32(buf+12), AV_RB32(buf+8));
+ avpriv_set_pts_info(st, 64, AV_RB32(buf+12), AV_RB32(buf+8));
return 1;
}
diff --git a/libavformat/oggparseflac.c b/libavformat/oggparseflac.c
index e5f517f..b1d18ed 100644
--- a/libavformat/oggparseflac.c
+++ b/libavformat/oggparseflac.c
@@ -22,6 +22,7 @@
#include "libavcodec/get_bits.h"
#include "libavcodec/flac.h"
#include "avformat.h"
+#include "internal.h"
#include "oggdec.h"
#define OGG_FLAC_METADATA_TYPE_STREAMINFO 0x7F
@@ -65,7 +66,7 @@ flac_header (AVFormatContext * s, int idx)
memcpy(st->codec->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE);
st->codec->extradata_size = FLAC_STREAMINFO_SIZE;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
} else if (mdt == FLAC_METADATA_TYPE_VORBIS_COMMENT) {
ff_vorbis_comment (s, &st->metadata, os->buf + os->pstart + 4, os->psize - 4);
}
diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c
index 9526c3a..0a8a7c6 100644
--- a/libavformat/oggparseogm.c
+++ b/libavformat/oggparseogm.c
@@ -27,6 +27,7 @@
#include "libavcodec/get_bits.h"
#include "libavcodec/bytestream.h"
#include "avformat.h"
+#include "internal.h"
#include "oggdec.h"
#include "riff.h"
@@ -81,13 +82,13 @@ ogm_header(AVFormatContext *s, int idx)
st->codec->height = bytestream_get_le32(&p);
st->codec->time_base.den = spu * 10000000;
st->codec->time_base.num = time_unit;
- av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
+ avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
} else {
st->codec->channels = bytestream_get_le16(&p);
p += 2; /* block_align */
st->codec->bit_rate = bytestream_get_le32(&p) * 8;
st->codec->sample_rate = spu * 10000000 / time_unit;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
}
} else if (*p == 3) {
if (os->psize > 8)
diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c
index ceb7c69..62dd14d 100644
--- a/libavformat/oggparseskeleton.c
+++ b/libavformat/oggparseskeleton.c
@@ -20,6 +20,7 @@
#include "libavcodec/bytestream.h"
#include "avformat.h"
+#include "internal.h"
#include "oggdec.h"
static int skeleton_header(AVFormatContext *s, int idx)
@@ -62,7 +63,7 @@ static int skeleton_header(AVFormatContext *s, int idx)
if (start_den) {
int base_den;
av_reduce(&start_time, &base_den, start_num, start_den, INT_MAX);
- av_set_pts_info(st, 64, 1, base_den);
+ avpriv_set_pts_info(st, 64, 1, base_den);
os->lastpts =
st->start_time = start_time;
}
diff --git a/libavformat/oggparsespeex.c b/libavformat/oggparsespeex.c
index bbeeb20..435ed0c 100644
--- a/libavformat/oggparsespeex.c
+++ b/libavformat/oggparsespeex.c
@@ -28,6 +28,7 @@
#include "libavcodec/get_bits.h"
#include "libavcodec/bytestream.h"
#include "avformat.h"
+#include "internal.h"
#include "oggdec.h"
struct speex_params {
@@ -69,7 +70,7 @@ static int speex_header(AVFormatContext *s, int idx) {
+ FF_INPUT_BUFFER_PADDING_SIZE);
memcpy(st->codec->extradata, p, st->codec->extradata_size);
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
} else
ff_vorbis_comment(s, &st->metadata, p, os->psize);
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index d02781f..993db3e 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -26,6 +26,7 @@
#include "libavutil/bswap.h"
#include "libavcodec/get_bits.h"
#include "avformat.h"
+#include "internal.h"
#include "oggdec.h"
struct theora_params {
@@ -91,7 +92,7 @@ theora_header (AVFormatContext * s, int idx)
st->codec->time_base.num = 1;
st->codec->time_base.den = 25;
}
- av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
+ avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
st->sample_aspect_ratio.num = get_bits_long(&gb, 24);
st->sample_aspect_ratio.den = get_bits_long(&gb, 24);
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 8a40697..ba9b348 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -254,7 +254,7 @@ vorbis_header (AVFormatContext * s, int idx)
if (srate > 0) {
st->codec->sample_rate = srate;
- av_set_pts_info(st, 64, 1, srate);
+ avpriv_set_pts_info(st, 64, 1, srate);
}
} else if (os->buf[os->pstart] == 3) {
if (os->psize > 8 &&
diff --git a/libavformat/oma.c b/libavformat/oma.c
index da01468..9e98202 100644
--- a/libavformat/oma.c
+++ b/libavformat/oma.c
@@ -41,6 +41,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/des.h"
#include "pcm.h"
@@ -343,14 +344,14 @@ static int oma_read_header(AVFormatContext *s,
AV_WL16(&edata[10], 1); // always 1
// AV_WL16(&edata[12], 0); // always 0
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
break;
case OMA_CODECID_ATRAC3P:
st->codec->channels = (codec_params >> 10) & 7;
framesize = ((codec_params & 0x3FF) * 8) + 8;
st->codec->sample_rate = srate_tab[(codec_params >> 13) & 7]*100;
st->codec->bit_rate = st->codec->sample_rate * framesize * 8 / 1024;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
av_log(s, AV_LOG_ERROR, "Unsupported codec ATRAC3+!\n");
break;
case OMA_CODECID_MP3:
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index 90385df..d22de08 100644
--- a/libavformat/psxstr.c
+++ b/libavformat/psxstr.c
@@ -31,6 +31,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define RIFF_TAG MKTAG('R', 'I', 'F', 'F')
#define CDXA_TAG MKTAG('C', 'D', 'X', 'A')
@@ -165,7 +166,7 @@ static int str_read_packet(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 64, 1, 15);
+ avpriv_set_pts_info(st, 64, 1, 15);
str->channels[channel].video_stream_index = st->index;
@@ -224,7 +225,7 @@ static int str_read_packet(AVFormatContext *s,
// st->codec->bit_rate = 0; //FIXME;
st->codec->block_align = 128;
- av_set_pts_info(st, 64, 128, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 128, st->codec->sample_rate);
}
pkt = ret_pkt;
if (av_new_packet(pkt, 2304))
diff --git a/libavformat/pva.c b/libavformat/pva.c
index 55883d7..263fb5f 100644
--- a/libavformat/pva.c
+++ b/libavformat/pva.c
@@ -20,6 +20,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "mpeg.h"
#define PVA_MAX_PAYLOAD_LENGTH 0x17f8
@@ -48,7 +49,7 @@ static int pva_read_header(AVFormatContext *s, AVFormatParameters *ap) {
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_MPEG2VIDEO;
st->need_parsing = AVSTREAM_PARSE_FULL;
- av_set_pts_info(st, 32, 1, 90000);
+ avpriv_set_pts_info(st, 32, 1, 90000);
av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME);
if (!(st = avformat_new_stream(s, NULL)))
@@ -56,7 +57,7 @@ static int pva_read_header(AVFormatContext *s, AVFormatParameters *ap) {
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_MP2;
st->need_parsing = AVSTREAM_PARSE_FULL;
- av_set_pts_info(st, 33, 1, 90000);
+ avpriv_set_pts_info(st, 33, 1, 90000);
av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME);
/* the parameters will be extracted from the compressed bitstream */
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index 11d4505..73e7398 100644
--- a/libavformat/r3d.c
+++ b/libavformat/r3d.c
@@ -25,6 +25,7 @@
#include "libavutil/dict.h"
#include "libavutil/mathematics.h"
#include "avformat.h"
+#include "internal.h"
typedef struct {
unsigned video_offsets_count;
@@ -70,7 +71,7 @@ static int r3d_read_red1(AVFormatContext *s)
av_dlog(s, "unknown1 %d\n", tmp);
tmp = avio_rb32(s->pb);
- av_set_pts_info(st, 32, 1, tmp);
+ avpriv_set_pts_info(st, 32, 1, tmp);
tmp = avio_rb32(s->pb); // filenum
av_dlog(s, "filenum %d\n", tmp);
@@ -95,7 +96,7 @@ static int r3d_read_red1(AVFormatContext *s)
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codec->codec_id = CODEC_ID_PCM_S32BE;
ast->codec->channels = tmp;
- av_set_pts_info(ast, 32, 1, st->time_base.den);
+ avpriv_set_pts_info(ast, 32, 1, st->time_base.den);
}
avio_read(s->pb, filename, 257);
diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index db8a0cd..81dd8b4 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -21,6 +21,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "avio_internal.h"
#include "rawdec.h"
#include "libavutil/opt.h"
@@ -62,7 +63,7 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->bits_per_coded_sample = av_get_bits_per_sample(st->codec->codec_id);
assert(st->codec->bits_per_coded_sample > 0);
st->codec->block_align = st->codec->bits_per_coded_sample*st->codec->channels/8;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
break;
}
case AVMEDIA_TYPE_VIDEO: {
@@ -84,7 +85,7 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
av_log(s, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s1->framerate);
goto fail;
}
- av_set_pts_info(st, 64, framerate.den, framerate.num);
+ avpriv_set_pts_info(st, 64, framerate.den, framerate.num);
st->codec->width = width;
st->codec->height = height;
st->codec->pix_fmt = pix_fmt;
@@ -159,7 +160,7 @@ int ff_raw_video_read_header(AVFormatContext *s,
}
st->codec->time_base = (AVRational){framerate.den, framerate.num};
- av_set_pts_info(st, 64, 1, 1200000);
+ avpriv_set_pts_info(st, 64, 1, 1200000);
fail:
return ret;
diff --git a/libavformat/rl2.c b/libavformat/rl2.c
index e7b9fd9..b2be7c0 100644
--- a/libavformat/rl2.c
+++ b/libavformat/rl2.c
@@ -35,6 +35,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "avformat.h"
+#include "internal.h"
#define EXTRADATA1_SIZE (6 + 256 * 3) ///< video base, clr, palette
@@ -153,10 +154,10 @@ static av_cold int rl2_read_header(AVFormatContext *s,
st->codec->bits_per_coded_sample;
st->codec->block_align = st->codec->channels *
st->codec->bits_per_coded_sample / 8;
- av_set_pts_info(st,32,1,rate);
+ avpriv_set_pts_info(st,32,1,rate);
}
- av_set_pts_info(s->streams[0], 32, pts_num, pts_den);
+ avpriv_set_pts_info(s->streams[0], 32, pts_num, pts_den);
chunk_size = av_malloc(frame_count * sizeof(uint32_t));
audio_size = av_malloc(frame_count * sizeof(uint32_t));
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index a13f970..66b6f8a 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -23,6 +23,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
#include "rm.h"
@@ -301,7 +302,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
int64_t codec_pos;
int ret;
- av_set_pts_info(st, 64, 1, 1000);
+ avpriv_set_pts_info(st, 64, 1, 1000);
codec_pos = avio_tell(pb);
v = avio_rb32(pb);
if (v == MKTAG(0xfd, 'a', 'r', '.')) {
diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index b2651f1..0fa00f3 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -22,6 +22,7 @@
#include "libavutil/avstring.h"
#include "libavutil/dict.h"
#include "avformat.h"
+#include "internal.h"
#include <stdlib.h>
#define RPL_SIGNATURE "ARMovie\x0A"
@@ -149,7 +150,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap)
vst->codec->bits_per_coded_sample = read_line_and_int(pb, &error); // video bits per sample
error |= read_line(pb, line, sizeof(line)); // video frames per second
fps = read_fps(line, &error);
- av_set_pts_info(vst, 32, fps.den, fps.num);
+ avpriv_set_pts_info(vst, 32, fps.den, fps.num);
// Figure out the video codec
switch (vst->codec->codec_tag) {
@@ -226,7 +227,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap)
"RPL audio format %i not supported yet!\n",
audio_format);
}
- av_set_pts_info(ast, 32, 1, ast->codec->bit_rate);
+ avpriv_set_pts_info(ast, 32, 1, ast->codec->bit_rate);
} else {
for (i = 0; i < 3; i++)
error |= read_line(pb, line, sizeof(line));
diff --git a/libavformat/rsodec.c b/libavformat/rsodec.c
index cdce7e6..54a3faa 100644
--- a/libavformat/rsodec.c
+++ b/libavformat/rsodec.c
@@ -65,7 +65,7 @@ static int rso_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->channels = 1;
st->codec->sample_rate = rate;
- av_set_pts_info(st, 64, 1, rate);
+ avpriv_set_pts_info(st, 64, 1, rate);
return 0;
}
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index 9d8c87b..6a84728 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -33,6 +33,7 @@
#include "rtsp.h"
#include "asf.h"
#include "avio_internal.h"
+#include "internal.h"
/**
* From MSDN 2.2.1.4, we learn that ASF data packets over RTP should not
@@ -141,7 +142,7 @@ static int asfrtp_parse_sdp_line(AVFormatContext *s, int stream_index,
*rt->asf_ctx->streams[i]->codec;
rt->asf_ctx->streams[i]->codec->extradata_size = 0;
rt->asf_ctx->streams[i]->codec->extradata = NULL;
- av_set_pts_info(s->streams[stream_index], 32, 1, 1000);
+ avpriv_set_pts_info(s->streams[stream_index], 32, 1, 1000);
}
}
}
diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c
index 8dd2968..1037154 100644
--- a/libavformat/rtpdec_qt.c
+++ b/libavformat/rtpdec_qt.c
@@ -26,6 +26,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "avio_internal.h"
#include "rtp.h"
#include "rtpdec.h"
@@ -110,7 +111,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
(st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
tag != MKTAG('s','o','u','n')))
return AVERROR_INVALIDDATA;
- av_set_pts_info(st, 32, 1, avio_rb32(&pb));
+ avpriv_set_pts_info(st, 32, 1, avio_rb32(&pb));
if (pos + data_len > len)
return AVERROR_INVALIDDATA;
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index dfd7461..77ae6f3 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -130,7 +130,7 @@ static int rtp_write_header(AVFormatContext *s1)
}
}
- av_set_pts_info(st, 32, 1, 90000);
+ avpriv_set_pts_info(st, 32, 1, 90000);
switch(st->codec->codec_id) {
case CODEC_ID_MP2:
case CODEC_ID_MP3:
@@ -166,7 +166,7 @@ static int rtp_write_header(AVFormatContext *s1)
case CODEC_ID_ADPCM_G722:
/* Due to a historical error, the clock rate for G722 in RTP is
* 8000, even if the sample rate is 16000. See RFC 3551. */
- av_set_pts_info(st, 32, 1, 8000);
+ avpriv_set_pts_info(st, 32, 1, 8000);
break;
case CODEC_ID_AMR_NB:
case CODEC_ID_AMR_WB:
@@ -190,7 +190,7 @@ static int rtp_write_header(AVFormatContext *s1)
default:
defaultcase:
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
- av_set_pts_info(st, 32, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate);
}
s->buf_ptr = s->buf;
break;
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 1f32050..7548a41 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -228,7 +228,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s,
codec->channels = RTSP_DEFAULT_NB_AUDIO_CHANNELS;
if (i > 0) {
codec->sample_rate = i;
- av_set_pts_info(st, 32, 1, codec->sample_rate);
+ avpriv_set_pts_info(st, 32, 1, codec->sample_rate);
get_word_sep(buf, sizeof(buf), "/", &p);
i = atoi(buf);
if (i > 0)
@@ -246,7 +246,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s,
case AVMEDIA_TYPE_VIDEO:
av_log(s, AV_LOG_DEBUG, "video codec set to: %s\n", c_name);
if (i > 0)
- av_set_pts_info(st, 32, 1, i);
+ avpriv_set_pts_info(st, 32, 1, i);
break;
default:
break;
@@ -385,7 +385,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
ff_rtp_get_codec_info(st->codec, rtsp_st->sdp_payload_type);
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
st->codec->sample_rate > 0)
- av_set_pts_info(st, 32, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate);
/* Even static payload types may need a custom depacketizer */
handler = ff_rtp_handler_find_by_id(
rtsp_st->sdp_payload_type, st->codec->codec_type);
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index 9bf81d3..5c346a7 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -29,6 +29,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define FILM_TAG MKBETAG('F', 'I', 'L', 'M')
#define FDSC_TAG MKBETAG('F', 'D', 'S', 'C')
@@ -197,7 +198,7 @@ static int film_read_header(AVFormatContext *s,
return AVERROR(ENOMEM);
for(i=0; i<s->nb_streams; i++)
- av_set_pts_info(s->streams[i], 33, 1, film->base_clock);
+ avpriv_set_pts_info(s->streams[i], 33, 1, film->base_clock);
audio_frame_counter = 0;
for (i = 0; i < film->sample_count; i++) {
diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c
index cf66895..1b5f04b 100644
--- a/libavformat/sierravmd.c
+++ b/libavformat/sierravmd.c
@@ -29,6 +29,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define VMD_HEADER_SIZE 0x0330
#define BYTES_PER_FRAME_RECORD 16
@@ -107,7 +108,7 @@ static int vmd_read_header(AVFormatContext *s,
vst = avformat_new_stream(s, NULL);
if (!vst)
return AVERROR(ENOMEM);
- av_set_pts_info(vst, 33, 1, 10);
+ avpriv_set_pts_info(vst, 33, 1, 10);
vmd->video_stream_index = vst->index;
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = vmd->is_indeo3 ? CODEC_ID_INDEO3 : CODEC_ID_VMDVIDEO;
@@ -148,8 +149,8 @@ static int vmd_read_header(AVFormatContext *s,
num = st->codec->block_align;
den = st->codec->sample_rate * st->codec->channels;
av_reduce(&den, &num, den, num, (1UL<<31)-1);
- av_set_pts_info(vst, 33, num, den);
- av_set_pts_info(st, 33, num, den);
+ avpriv_set_pts_info(vst, 33, num, den);
+ avpriv_set_pts_info(st, 33, num, den);
}
toc_offset = AV_RL32(&vmd->vmd_header[812]);
diff --git a/libavformat/siff.c b/libavformat/siff.c
index 9c24c51..9f4d733 100644
--- a/libavformat/siff.c
+++ b/libavformat/siff.c
@@ -21,6 +21,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
enum SIFFTags{
TAG_SIFF = MKTAG('S', 'I', 'F', 'F'),
@@ -80,7 +81,7 @@ static int create_audio_stream(AVFormatContext *s, SIFFContext *c)
ast->codec->bits_per_coded_sample = c->bits;
ast->codec->sample_rate = c->rate;
ast->codec->frame_size = c->block_align;
- av_set_pts_info(ast, 16, 1, c->rate);
+ avpriv_set_pts_info(ast, 16, 1, c->rate);
return 0;
}
@@ -124,7 +125,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, AVIOContext *pb)
st->codec->width = width;
st->codec->height = height;
st->codec->pix_fmt = PIX_FMT_PAL8;
- av_set_pts_info(st, 16, 1, 12);
+ avpriv_set_pts_info(st, 16, 1, 12);
c->cur_frame = 0;
c->has_video = 1;
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 279d586..770f536 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -26,6 +26,7 @@
#include "libavutil/bswap.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define SMACKER_PAL 0x01
#define SMACKER_FLAG_RING_FRAME 0x01
@@ -171,7 +172,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
smk->pts_inc *= 100;
tbase = 100000;
av_reduce(&tbase, &smk->pts_inc, tbase, smk->pts_inc, (1UL<<31)-1);
- av_set_pts_info(st, 33, smk->pts_inc, tbase);
+ avpriv_set_pts_info(st, 33, smk->pts_inc, tbase);
st->duration = smk->frames;
/* handle possible audio streams */
for(i = 0; i < 7; i++) {
@@ -195,7 +196,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
ast[i]->codec->bits_per_coded_sample = (smk->aflags[i] & SMK_AUD_16BITS) ? 16 : 8;
if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == CODEC_ID_PCM_U8)
ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE;
- av_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate
+ avpriv_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate
* ast[i]->codec->channels * ast[i]->codec->bits_per_coded_sample / 8);
}
}
diff --git a/libavformat/sol.c b/libavformat/sol.c
index 0fd4259..31c84ce 100644
--- a/libavformat/sol.c
+++ b/libavformat/sol.c
@@ -25,6 +25,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "pcm.h"
/* if we don't know the size in advance */
@@ -117,7 +118,7 @@ static int sol_read_header(AVFormatContext *s,
st->codec->codec_id = codec;
st->codec->channels = channels;
st->codec->sample_rate = rate;
- av_set_pts_info(st, 64, 1, rate);
+ avpriv_set_pts_info(st, 64, 1, rate);
return 0;
}
diff --git a/libavformat/soxdec.c b/libavformat/soxdec.c
index a9ee817..3e426be 100644
--- a/libavformat/soxdec.c
+++ b/libavformat/soxdec.c
@@ -33,6 +33,7 @@
#include "libavutil/intfloat_readwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
+#include "internal.h"
#include "pcm.h"
#include "sox.h"
@@ -117,7 +118,7 @@ static int sox_read_header(AVFormatContext *s,
st->codec->block_align = st->codec->bits_per_coded_sample *
st->codec->channels / 8;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
return 0;
}
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index 8927164..ca0a304 100644
--- a/libavformat/srtdec.c
+++ b/libavformat/srtdec.c
@@ -45,7 +45,7 @@ static int srt_read_header(AVFormatContext *s, AVFormatParameters *ap)
AVStream *st = avformat_new_stream(s, NULL);
if (!st)
return -1;
- av_set_pts_info(st, 64, 1, 1000);
+ avpriv_set_pts_info(st, 64, 1, 1000);
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
st->codec->codec_id = CODEC_ID_SRT;
return 0;
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index ac3d86c..1fc301b 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -112,7 +112,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
vst->id = ch_id;
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, avio_r8(pb));
- av_set_pts_info(vst, 16, 256, swf->frame_rate);
+ avpriv_set_pts_info(vst, 16, 256, swf->frame_rate);
vst->codec->time_base = (AVRational){ 256, swf->frame_rate };
len -= 8;
} else if (tag == TAG_STREAMHEAD || tag == TAG_STREAMHEAD2) {
@@ -141,7 +141,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
ast->codec->sample_rate = 5512;
else
ast->codec->sample_rate = 11025 << (sample_rate_code-1);
- av_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
+ avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
len -= 4;
} else if (tag == TAG_VIDEOFRAME) {
int ch_id = avio_rl16(pb);
@@ -185,7 +185,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
vst->id = -2; /* -2 to avoid clash with video stream and audio stream */
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_MJPEG;
- av_set_pts_info(vst, 64, 256, swf->frame_rate);
+ avpriv_set_pts_info(vst, 64, 256, swf->frame_rate);
vst->codec->time_base = (AVRational){ 256, swf->frame_rate };
st = vst;
}
diff --git a/libavformat/thp.c b/libavformat/thp.c
index 29312b4..5b1d180 100644
--- a/libavformat/thp.c
+++ b/libavformat/thp.c
@@ -22,6 +22,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat_readwrite.h"
#include "avformat.h"
+#include "internal.h"
typedef struct ThpDemuxContext {
int version;
@@ -100,7 +101,7 @@ static int thp_read_header(AVFormatContext *s,
/* The denominator and numerator are switched because 1/fps
is required. */
- av_set_pts_info(st, 64, thp->fps.den, thp->fps.num);
+ avpriv_set_pts_info(st, 64, thp->fps.den, thp->fps.num);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_THP;
st->codec->codec_tag = 0; /* no fourcc */
@@ -127,7 +128,7 @@ static int thp_read_header(AVFormatContext *s,
st->codec->channels = avio_rb32(pb); /* numChannels. */
st->codec->sample_rate = avio_rb32(pb); /* Frequency. */
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
thp->audio_stream_index = st->index;
thp->has_audio = 1;
diff --git a/libavformat/tiertexseq.c b/libavformat/tiertexseq.c
index 03d69db..0590190 100644
--- a/libavformat/tiertexseq.c
+++ b/libavformat/tiertexseq.c
@@ -25,6 +25,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#define SEQ_FRAME_SIZE 6144
#define SEQ_FRAME_W 256
@@ -210,7 +211,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 32, 1, SEQ_FRAME_RATE);
+ avpriv_set_pts_info(st, 32, 1, SEQ_FRAME_RATE);
seq->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_TIERTEXSEQVIDEO;
@@ -223,7 +224,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE);
+ avpriv_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE);
seq->audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_PCM_S16BE;
diff --git a/libavformat/tmv.c b/libavformat/tmv.c
index b0b6a1b..73b44bb 100644
--- a/libavformat/tmv.c
+++ b/libavformat/tmv.c
@@ -28,6 +28,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
enum {
TMV_PADDING = 0x01,
@@ -115,7 +116,7 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
ast->codec->bits_per_coded_sample = 8;
ast->codec->bit_rate = ast->codec->sample_rate *
ast->codec->bits_per_coded_sample;
- av_set_pts_info(ast, 32, 1, ast->codec->sample_rate);
+ avpriv_set_pts_info(ast, 32, 1, ast->codec->sample_rate);
fps.num = ast->codec->sample_rate * ast->codec->channels;
fps.den = tmv->audio_chunk_size;
@@ -126,7 +127,7 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
vst->codec->pix_fmt = PIX_FMT_PAL8;
vst->codec->width = char_cols * 8;
vst->codec->height = char_rows * 8;
- av_set_pts_info(vst, 32, fps.den, fps.num);
+ avpriv_set_pts_info(vst, 32, fps.den, fps.num);
if (features & TMV_PADDING)
tmv->padding =
diff --git a/libavformat/tta.c b/libavformat/tta.c
index 9efcd1d..37a359b 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -21,6 +21,7 @@
#include "libavcodec/get_bits.h"
#include "avformat.h"
+#include "internal.h"
#include "id3v1.h"
#include "libavutil/dict.h"
@@ -81,7 +82,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 64, 1, samplerate);
+ avpriv_set_pts_info(st, 64, 1, samplerate);
st->start_time = 0;
st->duration = datalen;
diff --git a/libavformat/tty.c b/libavformat/tty.c
index 8f2311d..8041900 100644
--- a/libavformat/tty.c
+++ b/libavformat/tty.c
@@ -31,6 +31,7 @@
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "avformat.h"
+#include "internal.h"
#include "sauce.h"
typedef struct {
@@ -97,7 +98,7 @@ static int read_header(AVFormatContext *avctx,
}
st->codec->width = width;
st->codec->height = height;
- av_set_pts_info(st, 60, framerate.den, framerate.num);
+ avpriv_set_pts_info(st, 60, framerate.den, framerate.num);
/* simulate tty display speed */
s->chars_per_frame = FFMAX(av_q2d(st->time_base)*s->chars_per_frame, 1);
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 29eaf1b..10e79eb 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2739,7 +2739,7 @@ AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c)
st->probe_packets = MAX_PROBE_PACKETS;
/* default pts setting is MPEG-like */
- av_set_pts_info(st, 33, 1, 90000);
+ avpriv_set_pts_info(st, 33, 1, 90000);
st->last_IP_pts = AV_NOPTS_VALUE;
for(i=0; i<MAX_REORDER_DELAY+1; i++)
st->pts_buffer[i]= AV_NOPTS_VALUE;
@@ -3742,9 +3742,17 @@ int ff_hex_to_data(uint8_t *data, const char *p)
return len;
}
+#if FF_API_SET_PTS_INFO
void av_set_pts_info(AVStream *s, int pts_wrap_bits,
unsigned int pts_num, unsigned int pts_den)
{
+ avpriv_set_pts_info(s, pts_wrap_bits, pts_num, pts_den);
+}
+#endif
+
+void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits,
+ unsigned int pts_num, unsigned int pts_den)
+{
AVRational new_tb;
if(av_reduce(&new_tb.num, &new_tb.den, pts_num, pts_den, INT_MAX)){
if(new_tb.num != pts_num)
diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c
index 172a64c..6789b9d 100644
--- a/libavformat/vc1test.c
+++ b/libavformat/vc1test.c
@@ -28,6 +28,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define VC1_EXTRADATA_SIZE 4
@@ -71,13 +72,13 @@ static int vc1t_read_header(AVFormatContext *s,
avio_skip(pb, 8);
fps = avio_rl32(pb);
if(fps == 0xFFFFFFFF)
- av_set_pts_info(st, 32, 1, 1000);
+ avpriv_set_pts_info(st, 32, 1, 1000);
else{
if (!fps) {
av_log(s, AV_LOG_ERROR, "Zero FPS specified, defaulting to 1 FPS\n");
fps = 1;
}
- av_set_pts_info(st, 24, 1, fps);
+ avpriv_set_pts_info(st, 24, 1, fps);
st->duration = frames;
}
diff --git a/libavformat/vc1testenc.c b/libavformat/vc1testenc.c
index 0ee9b90..a1228d8 100644
--- a/libavformat/vc1testenc.c
+++ b/libavformat/vc1testenc.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avformat.h"
+#include "internal.h"
typedef struct RCVContext {
int frames;
@@ -47,7 +48,7 @@ static int vc1test_write_header(AVFormatContext *s)
avio_wl32(pb, s->streams[0]->r_frame_rate.den);
else
avio_wl32(pb, 0xFFFFFFFF); //variable framerate
- av_set_pts_info(s->streams[0], 32, 1, 1000);
+ avpriv_set_pts_info(s->streams[0], 32, 1, 1000);
return 0;
}
diff --git a/libavformat/version.h b/libavformat/version.h
index 37c3d5b..ba1254f 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -113,5 +113,8 @@
#ifndef FF_API_OLD_INTERRUPT_CB
#define FF_API_OLD_INTERRUPT_CB (LIBAVFORMAT_VERSION_MAJOR < 54)
#endif
+#ifndef FF_API_SET_PTS_INFO
+#define FF_API_SET_PTS_INFO (LIBAVFORMAT_VERSION_MAJOR < 54)
+#endif
#endif /* AVFORMAT_VERSION_H */
diff --git a/libavformat/vqf.c b/libavformat/vqf.c
index f2c1d8f..aba763d 100644
--- a/libavformat/vqf.c
+++ b/libavformat/vqf.c
@@ -20,6 +20,7 @@
*/
#include "avformat.h"
+#include "internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "libavutil/mathematics.h"
@@ -192,7 +193,7 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap)
return -1;
}
c->frame_bit_len = st->codec->bit_rate*size/st->codec->sample_rate;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
/* put first 12 bytes of COMM chunk in extradata */
if (!(st->codec->extradata = av_malloc(12 + FF_INPUT_BUFFER_PADDING_SIZE)))
diff --git a/libavformat/wav.c b/libavformat/wav.c
index 3e03037..47cb5f8 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -29,6 +29,7 @@
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "avformat.h"
+#include "internal.h"
#include "avio_internal.h"
#include "pcm.h"
#include "riff.h"
@@ -130,7 +131,7 @@ static int wav_write_header(AVFormatContext *s)
if (wav->write_bext)
bwf_write_bext_chunk(s);
- av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
+ avpriv_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
wav->maxpts = wav->last_duration = 0;
wav->minpts = INT64_MAX;
@@ -281,7 +282,7 @@ static int wav_parse_fmt_tag(AVFormatContext *s, int64_t size, AVStream **st)
return ret;
(*st)->need_parsing = AVSTREAM_PARSE_FULL;
- av_set_pts_info(*st, 64, 1, (*st)->codec->sample_rate);
+ avpriv_set_pts_info(*st, 64, 1, (*st)->codec->sample_rate);
return 0;
}
@@ -660,7 +661,7 @@ static int w64_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->need_parsing = AVSTREAM_PARSE_FULL;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
size = find_guid(pb, guid_data);
if (size < 0) {
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index b4d2772..af5470f 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -30,6 +30,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
+#include "internal.h"
#define FORM_TAG MKTAG('F', 'O', 'R', 'M')
#define MOVE_TAG MKTAG('M', 'O', 'V', 'E')
@@ -166,7 +167,7 @@ static int wc3_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
+ avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
wc3->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_XAN_WC3;
@@ -177,7 +178,7 @@ static int wc3_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
+ avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
wc3->audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_PCM_S16LE;
diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index be0140b..67a00c9 100644
--- a/libavformat/westwood.c
+++ b/libavformat/westwood.c
@@ -35,6 +35,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define AUD_HEADER_SIZE 12
#define AUD_CHUNK_PREAMBLE_SIZE 8
@@ -147,7 +148,7 @@ static int wsaud_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 33, 1, wsaud->audio_samplerate);
+ avpriv_set_pts_info(st, 33, 1, wsaud->audio_samplerate);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = wsaud->audio_type;
st->codec->codec_tag = 0; /* no tag */
@@ -224,7 +225,7 @@ static int wsvqa_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
+ avpriv_set_pts_info(st, 33, 1, VQA_FRAMERATE);
wsvqa->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_WS_VQA;
@@ -250,7 +251,7 @@ static int wsvqa_read_header(AVFormatContext *s,
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
+ avpriv_set_pts_info(st, 33, 1, VQA_FRAMERATE);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
if (AV_RL16(&header[0]) == 1)
st->codec->codec_id = CODEC_ID_WESTWOOD_SND1;
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index c3bc083..0cef6fb 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -633,7 +633,7 @@ static AVStream * new_stream(AVFormatContext *s, AVStream *st, int sid, int code
}
st->codec->codec_type = codec_type;
st->need_parsing = AVSTREAM_PARSE_FULL;
- av_set_pts_info(st, 64, 1, 10000000);
+ avpriv_set_pts_info(st, 64, 1, 10000000);
return st;
}
diff --git a/libavformat/wv.c b/libavformat/wv.c
index 4816ed6..5f7b3b4 100644
--- a/libavformat/wv.c
+++ b/libavformat/wv.c
@@ -23,6 +23,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
+#include "internal.h"
#include "apetag.h"
#include "id3v1.h"
@@ -229,7 +230,7 @@ static int wv_read_header(AVFormatContext *s,
st->codec->channel_layout = wc->chmask;
st->codec->sample_rate = wc->rate;
st->codec->bits_per_coded_sample = wc->bpp;
- av_set_pts_info(st, 64, 1, wc->rate);
+ avpriv_set_pts_info(st, 64, 1, wc->rate);
st->start_time = 0;
st->duration = wc->samples;
diff --git a/libavformat/xa.c b/libavformat/xa.c
index cdff35d..0a1ad59 100644
--- a/libavformat/xa.c
+++ b/libavformat/xa.c
@@ -29,6 +29,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#define XA00_TAG MKTAG('X', 'A', 0, 0)
#define XAI0_TAG MKTAG('X', 'A', 'I', 0)
@@ -86,7 +87,7 @@ static int xa_read_header(AVFormatContext *s,
st->codec->block_align = avio_rl16(pb);
st->codec->bits_per_coded_sample = avio_rl16(pb);
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
return 0;
}
diff --git a/libavformat/xmv.c b/libavformat/xmv.c
index 30e3b5a..bc4b239 100644
--- a/libavformat/xmv.c
+++ b/libavformat/xmv.c
@@ -30,6 +30,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
#define XMV_MIN_HEADER_SIZE 36
@@ -154,7 +155,7 @@ static int xmv_read_header(AVFormatContext *s,
if (!vst)
return AVERROR(ENOMEM);
- av_set_pts_info(vst, 32, 1, 1000);
+ avpriv_set_pts_info(vst, 32, 1, 1000);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = CODEC_ID_WMV2;
@@ -224,7 +225,7 @@ static int xmv_read_header(AVFormatContext *s,
ast->codec->bit_rate = track->bit_rate;
ast->codec->block_align = 36 * track->channels;
- av_set_pts_info(ast, 32, track->block_samples, track->sample_rate);
+ avpriv_set_pts_info(ast, 32, track->block_samples, track->sample_rate);
packet->stream_index = ast->index;
diff --git a/libavformat/xwma.c b/libavformat/xwma.c
index 9a1a6b6..5839bdc 100644
--- a/libavformat/xwma.c
+++ b/libavformat/xwma.c
@@ -22,6 +22,7 @@
#include <inttypes.h>
#include "avformat.h"
+#include "internal.h"
#include "riff.h"
/*
@@ -115,7 +116,7 @@ static int xwma_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
/* set the sample rate */
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
/* parse the remaining RIFF chunks */
for (;;) {
diff --git a/libavformat/yop.c b/libavformat/yop.c
index c9bf9f8..a317825 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -24,6 +24,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
+#include "internal.h"
typedef struct yop_dec_context {
AVPacket video_packet;
@@ -105,7 +106,7 @@ static int yop_read_header(AVFormatContext *s, AVFormatParameters *ap)
avio_seek(pb, 2048, SEEK_SET);
- av_set_pts_info(video_stream, 32, 1, frame_rate);
+ avpriv_set_pts_info(video_stream, 32, 1, frame_rate);
return 0;
}
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
index e1db1a3..66fcc1f 100644
--- a/libavformat/yuv4mpeg.c
+++ b/libavformat/yuv4mpeg.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avformat.h"
+#include "internal.h"
#define Y4M_MAGIC "YUV4MPEG2"
#define Y4M_FRAME_MAGIC "FRAME"
@@ -333,7 +334,7 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->width = width;
st->codec->height = height;
av_reduce(&raten, &rated, raten, rated, (1UL<<31)-1);
- av_set_pts_info(st, 64, rated, raten);
+ avpriv_set_pts_info(st, 64, rated, raten);
st->codec->pix_fmt = pix_fmt;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_RAWVIDEO;
More information about the ffmpeg-cvslog
mailing list