Commit c3f9ebf7 authored by Anton Khirnov's avatar Anton Khirnov

lavf: make av_set_pts_info private.

It's supposed to be called only from (de)muxers.
parent 06d7325a
......@@ -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;
......
......@@ -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;
......
......@@ -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)
......
......@@ -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;
}
......
......@@ -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];
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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) /
......
......@@ -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;
}
......
......@@ -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) {
......
......@@ -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);
......
......@@ -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) {
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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));
......
......@@ -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 */
......
......@@ -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;
}
}
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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)
......
......@@ -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;
......
......@@ -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;
......