It's supposed to be called only from (de)muxers.
| ... | ... |
@@ -47,6 +47,7 @@ |
| 47 | 47 |
|
| 48 | 48 |
#include <alsa/asoundlib.h> |
| 49 | 49 |
#include "libavformat/avformat.h" |
| 50 |
+#include "libavformat/internal.h" |
|
| 50 | 51 |
#include "libavutil/opt.h" |
| 51 | 52 |
|
| 52 | 53 |
#include "alsa-audio.h" |
| ... | ... |
@@ -102,7 +103,7 @@ static av_cold int audio_read_header(AVFormatContext *s1, |
| 102 | 102 |
st->codec->codec_id = codec_id; |
| 103 | 103 |
st->codec->sample_rate = s->sample_rate; |
| 104 | 104 |
st->codec->channels = s->channels; |
| 105 |
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 105 |
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 106 | 106 |
|
| 107 | 107 |
return 0; |
| 108 | 108 |
|
| ... | ... |
@@ -25,6 +25,7 @@ |
| 25 | 25 |
*/ |
| 26 | 26 |
|
| 27 | 27 |
#include "libavformat/avformat.h" |
| 28 |
+#include "libavformat/internal.h" |
|
| 28 | 29 |
#include "libavutil/log.h" |
| 29 | 30 |
#include "libavutil/opt.h" |
| 30 | 31 |
#include "libavutil/parseutils.h" |
| ... | ... |
@@ -275,7 +276,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) |
| 275 | 275 |
ret = AVERROR(ENOMEM); |
| 276 | 276 |
goto out; |
| 277 | 277 |
} |
| 278 |
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in use */ |
|
| 278 |
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in use */ |
|
| 279 | 279 |
|
| 280 | 280 |
s->width = width; |
| 281 | 281 |
s->height = height; |
| ... | ... |
@@ -43,6 +43,7 @@ |
| 43 | 43 |
#include "libavutil/parseutils.h" |
| 44 | 44 |
#include "libavutil/pixdesc.h" |
| 45 | 45 |
#include "libavformat/avformat.h" |
| 46 |
+#include "libavformat/internal.h" |
|
| 46 | 47 |
|
| 47 | 48 |
struct rgb_pixfmt_map_entry {
|
| 48 | 49 |
int bits_per_pixel; |
| ... | ... |
@@ -110,7 +111,7 @@ av_cold static int fbdev_read_header(AVFormatContext *avctx, |
| 110 | 110 |
|
| 111 | 111 |
if (!(st = avformat_new_stream(avctx, NULL))) |
| 112 | 112 |
return AVERROR(ENOMEM); |
| 113 |
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in microseconds */ |
|
| 113 |
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in microseconds */ |
|
| 114 | 114 |
|
| 115 | 115 |
/* NONBLOCK is ignored by the fbdev driver, only set for consistency */ |
| 116 | 116 |
if (avctx->flags & AVFMT_FLAG_NONBLOCK) |
| ... | ... |
@@ -29,6 +29,7 @@ |
| 29 | 29 |
#include "libavutil/opt.h" |
| 30 | 30 |
#include "libavcodec/avcodec.h" |
| 31 | 31 |
#include "libavformat/avformat.h" |
| 32 |
+#include "libavformat/internal.h" |
|
| 32 | 33 |
#include "timefilter.h" |
| 33 | 34 |
|
| 34 | 35 |
/** |
| ... | ... |
@@ -244,7 +245,7 @@ static int audio_read_header(AVFormatContext *context, AVFormatParameters *param |
| 244 | 244 |
stream->codec->sample_rate = self->sample_rate; |
| 245 | 245 |
stream->codec->channels = self->nports; |
| 246 | 246 |
|
| 247 |
- av_set_pts_info(stream, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 247 |
+ avpriv_set_pts_info(stream, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 248 | 248 |
return 0; |
| 249 | 249 |
} |
| 250 | 250 |
|
| ... | ... |
@@ -92,7 +92,7 @@ static av_cold int read_header(AVFormatContext *ctx, AVFormatParameters *ap) |
| 92 | 92 |
st->duration = s->drive->audio_last_sector - s->drive->audio_first_sector; |
| 93 | 93 |
else if (s->drive->tracks) |
| 94 | 94 |
st->duration = s->drive->disc_toc[s->drive->tracks].dwStartSector; |
| 95 |
- av_set_pts_info(st, 64, CDIO_CD_FRAMESIZE_RAW, 2*st->codec->channels*st->codec->sample_rate); |
|
| 95 |
+ avpriv_set_pts_info(st, 64, CDIO_CD_FRAMESIZE_RAW, 2*st->codec->channels*st->codec->sample_rate); |
|
| 96 | 96 |
|
| 97 | 97 |
for (i = 0; i < s->drive->tracks; i++) {
|
| 98 | 98 |
char title[16]; |
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
|
| 23 | 23 |
#include "config.h" |
| 24 | 24 |
#include "libavformat/avformat.h" |
| 25 |
+#include "libavformat/internal.h" |
|
| 25 | 26 |
#include "libavutil/log.h" |
| 26 | 27 |
#include "libavutil/mathematics.h" |
| 27 | 28 |
#include "libavutil/opt.h" |
| ... | ... |
@@ -165,7 +166,7 @@ static inline int dc1394_read_common(AVFormatContext *c, AVFormatParameters *ap, |
| 165 | 165 |
ret = AVERROR(ENOMEM); |
| 166 | 166 |
goto out; |
| 167 | 167 |
} |
| 168 |
- av_set_pts_info(vst, 64, 1, 1000); |
|
| 168 |
+ avpriv_set_pts_info(vst, 64, 1, 1000); |
|
| 169 | 169 |
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 170 | 170 |
vst->codec->codec_id = CODEC_ID_RAWVIDEO; |
| 171 | 171 |
vst->codec->time_base.den = framerate.num; |
| ... | ... |
@@ -40,6 +40,7 @@ |
| 40 | 40 |
#include "libavutil/opt.h" |
| 41 | 41 |
#include "libavcodec/avcodec.h" |
| 42 | 42 |
#include "libavformat/avformat.h" |
| 43 |
+#include "libavformat/internal.h" |
|
| 43 | 44 |
|
| 44 | 45 |
#define AUDIO_BLOCK_SIZE 4096 |
| 45 | 46 |
|
| ... | ... |
@@ -225,7 +226,7 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap) |
| 225 | 225 |
st->codec->sample_rate = s->sample_rate; |
| 226 | 226 |
st->codec->channels = s->channels; |
| 227 | 227 |
|
| 228 |
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 228 |
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 229 | 229 |
return 0; |
| 230 | 230 |
} |
| 231 | 231 |
|
| ... | ... |
@@ -31,6 +31,7 @@ |
| 31 | 31 |
#include <pulse/error.h> |
| 32 | 32 |
|
| 33 | 33 |
#include "libavformat/avformat.h" |
| 34 |
+#include "libavformat/internal.h" |
|
| 34 | 35 |
#include "libavutil/opt.h" |
| 35 | 36 |
|
| 36 | 37 |
#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, |
| 108 | 108 |
st->codec->codec_id = codec_id; |
| 109 | 109 |
st->codec->sample_rate = pd->sample_rate; |
| 110 | 110 |
st->codec->channels = pd->channels; |
| 111 |
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 111 |
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 112 | 112 |
|
| 113 | 113 |
pd->pts = AV_NOPTS_VALUE; |
| 114 | 114 |
pd->frame_duration = (pd->frame_size * 1000000LL * 8) / |
| ... | ... |
@@ -23,6 +23,7 @@ |
| 23 | 23 |
#include <sndio.h> |
| 24 | 24 |
|
| 25 | 25 |
#include "libavformat/avformat.h" |
| 26 |
+#include "libavformat/internal.h" |
|
| 26 | 27 |
#include "libavutil/opt.h" |
| 27 | 28 |
|
| 28 | 29 |
#include "sndio_common.h" |
| ... | ... |
@@ -48,7 +49,7 @@ static av_cold int audio_read_header(AVFormatContext *s1, |
| 48 | 48 |
st->codec->sample_rate = s->sample_rate; |
| 49 | 49 |
st->codec->channels = s->channels; |
| 50 | 50 |
|
| 51 |
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 51 |
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 52 | 52 |
|
| 53 | 53 |
return 0; |
| 54 | 54 |
} |
| ... | ... |
@@ -30,6 +30,7 @@ |
| 30 | 30 |
#include "libavutil/log.h" |
| 31 | 31 |
#include "libavutil/opt.h" |
| 32 | 32 |
#include "libavformat/avformat.h" |
| 33 |
+#include "libavformat/internal.h" |
|
| 33 | 34 |
#include "libavcodec/dsputil.h" |
| 34 | 35 |
#include <unistd.h> |
| 35 | 36 |
#include <fcntl.h> |
| ... | ... |
@@ -100,7 +101,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) |
| 100 | 100 |
st = avformat_new_stream(s1, NULL); |
| 101 | 101 |
if (!st) |
| 102 | 102 |
return AVERROR(ENOMEM); |
| 103 |
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 103 |
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 104 | 104 |
|
| 105 | 105 |
video_fd = open(s1->filename, O_RDWR); |
| 106 | 106 |
if (video_fd < 0) {
|
| ... | ... |
@@ -30,6 +30,7 @@ |
| 30 | 30 |
#undef __STRICT_ANSI__ //workaround due to broken kernel headers |
| 31 | 31 |
#include "config.h" |
| 32 | 32 |
#include "libavformat/avformat.h" |
| 33 |
+#include "libavformat/internal.h" |
|
| 33 | 34 |
#include <unistd.h> |
| 34 | 35 |
#include <fcntl.h> |
| 35 | 36 |
#include <sys/ioctl.h> |
| ... | ... |
@@ -585,7 +586,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap) |
| 585 | 585 |
res = AVERROR(ENOMEM); |
| 586 | 586 |
goto out; |
| 587 | 587 |
} |
| 588 |
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 588 |
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 589 | 589 |
|
| 590 | 590 |
if (s->video_size && (res = av_parse_video_size(&s->width, &s->height, s->video_size)) < 0) {
|
| 591 | 591 |
av_log(s1, AV_LOG_ERROR, "Could not parse video size '%s'.\n", s->video_size); |
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 | 22 |
#include "libavformat/avformat.h" |
| 23 |
+#include "libavformat/internal.h" |
|
| 23 | 24 |
#include "libavutil/log.h" |
| 24 | 25 |
#include "libavutil/opt.h" |
| 25 | 26 |
#include "libavutil/parseutils.h" |
| ... | ... |
@@ -396,7 +397,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 396 | 396 |
} |
| 397 | 397 |
} |
| 398 | 398 |
|
| 399 |
- av_set_pts_info(st, 32, 1, 1000); |
|
| 399 |
+ avpriv_set_pts_info(st, 32, 1, 1000); |
|
| 400 | 400 |
|
| 401 | 401 |
ctx->mutex = CreateMutex(NULL, 0, NULL); |
| 402 | 402 |
if(!ctx->mutex) {
|
| ... | ... |
@@ -37,6 +37,7 @@ |
| 37 | 37 |
|
| 38 | 38 |
#include "config.h" |
| 39 | 39 |
#include "libavformat/avformat.h" |
| 40 |
+#include "libavformat/internal.h" |
|
| 40 | 41 |
#include "libavutil/log.h" |
| 41 | 42 |
#include "libavutil/opt.h" |
| 42 | 43 |
#include "libavutil/parseutils.h" |
| ... | ... |
@@ -198,7 +199,7 @@ x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) |
| 198 | 198 |
ret = AVERROR(ENOMEM); |
| 199 | 199 |
goto out; |
| 200 | 200 |
} |
| 201 |
- av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 201 |
+ avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */ |
|
| 202 | 202 |
|
| 203 | 203 |
screen = DefaultScreen(dpy); |
| 204 | 204 |
|
| ... | ... |
@@ -30,6 +30,7 @@ |
| 30 | 30 |
#include "libavutil/intreadwrite.h" |
| 31 | 31 |
#include "libavutil/intfloat_readwrite.h" |
| 32 | 32 |
#include "avformat.h" |
| 33 |
+#include "internal.h" |
|
| 33 | 34 |
|
| 34 | 35 |
#define RIFF_TAG MKTAG('R', 'I', 'F', 'F')
|
| 35 | 36 |
#define FOURXMV_TAG MKTAG('4', 'X', 'M', 'V')
|
| ... | ... |
@@ -146,7 +147,7 @@ static int fourxm_read_header(AVFormatContext *s, |
| 146 | 146 |
ret= AVERROR(ENOMEM); |
| 147 | 147 |
goto fail; |
| 148 | 148 |
} |
| 149 |
- av_set_pts_info(st, 60, 1, fourxm->fps); |
|
| 149 |
+ avpriv_set_pts_info(st, 60, 1, fourxm->fps); |
|
| 150 | 150 |
|
| 151 | 151 |
fourxm->video_stream_index = st->index; |
| 152 | 152 |
|
| ... | ... |
@@ -205,7 +206,7 @@ static int fourxm_read_header(AVFormatContext *s, |
| 205 | 205 |
} |
| 206 | 206 |
|
| 207 | 207 |
st->id = current_track; |
| 208 |
- av_set_pts_info(st, 60, 1, fourxm->tracks[current_track].sample_rate); |
|
| 208 |
+ avpriv_set_pts_info(st, 60, 1, fourxm->tracks[current_track].sample_rate); |
|
| 209 | 209 |
|
| 210 | 210 |
fourxm->tracks[current_track].stream_index = st->index; |
| 211 | 211 |
|
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
|
| 23 | 23 |
#include "libavutil/intreadwrite.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
#include "rawdec.h" |
| 26 | 27 |
#include "id3v1.h" |
| 27 | 28 |
|
| ... | ... |
@@ -76,7 +77,7 @@ static int adts_aac_read_header(AVFormatContext *s, |
| 76 | 76 |
ff_id3v1_read(s); |
| 77 | 77 |
|
| 78 | 78 |
//LCM of all possible ADTS sample rates |
| 79 |
- av_set_pts_info(st, 64, 1, 28224000); |
|
| 79 |
+ avpriv_set_pts_info(st, 64, 1, 28224000); |
|
| 80 | 80 |
|
| 81 | 81 |
return 0; |
| 82 | 82 |
} |
| ... | ... |
@@ -26,6 +26,7 @@ |
| 26 | 26 |
#include "libavutil/intreadwrite.h" |
| 27 | 27 |
#include "libavcodec/adx.h" |
| 28 | 28 |
#include "avformat.h" |
| 29 |
+#include "internal.h" |
|
| 29 | 30 |
|
| 30 | 31 |
#define BLOCK_SIZE 18 |
| 31 | 32 |
#define BLOCK_SAMPLES 32 |
| ... | ... |
@@ -95,7 +96,7 @@ static int adx_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 95 | 95 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 96 | 96 |
st->codec->codec_id = s->iformat->value; |
| 97 | 97 |
|
| 98 |
- av_set_pts_info(st, 64, BLOCK_SAMPLES, avctx->sample_rate); |
|
| 98 |
+ avpriv_set_pts_info(st, 64, BLOCK_SAMPLES, avctx->sample_rate); |
|
| 99 | 99 |
|
| 100 | 100 |
return 0; |
| 101 | 101 |
} |
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include "libavutil/intfloat_readwrite.h" |
| 23 | 23 |
#include "libavutil/dict.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
#include "pcm.h" |
| 26 | 27 |
#include "aiff.h" |
| 27 | 28 |
|
| ... | ... |
@@ -268,7 +269,7 @@ static int aiff_read_header(AVFormatContext *s, |
| 268 | 268 |
|
| 269 | 269 |
got_sound: |
| 270 | 270 |
/* Now positioned, get the sound data start and end */ |
| 271 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 271 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 272 | 272 |
st->start_time = 0; |
| 273 | 273 |
st->duration = st->codec->frame_size ? |
| 274 | 274 |
st->nb_frames * st->codec->frame_size : st->nb_frames; |
| ... | ... |
@@ -21,6 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
#include "libavutil/intfloat_readwrite.h" |
| 23 | 23 |
#include "avformat.h" |
| 24 |
+#include "internal.h" |
|
| 24 | 25 |
#include "aiff.h" |
| 25 | 26 |
#include "avio_internal.h" |
| 26 | 27 |
|
| ... | ... |
@@ -96,7 +97,7 @@ static int aiff_write_header(AVFormatContext *s) |
| 96 | 96 |
avio_wb32(pb, 0); /* Data offset */ |
| 97 | 97 |
avio_wb32(pb, 0); /* Block-size (block align) */ |
| 98 | 98 |
|
| 99 |
- av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); |
|
| 99 |
+ avpriv_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); |
|
| 100 | 100 |
|
| 101 | 101 |
/* Data is starting here */ |
| 102 | 102 |
avio_flush(pb); |
| ... | ... |
@@ -26,6 +26,7 @@ Only mono files are supported. |
| 26 | 26 |
|
| 27 | 27 |
*/ |
| 28 | 28 |
#include "avformat.h" |
| 29 |
+#include "internal.h" |
|
| 29 | 30 |
|
| 30 | 31 |
static const char AMR_header [] = "#!AMR\n"; |
| 31 | 32 |
static const char AMRWB_header [] = "#!AMR-WB\n"; |
| ... | ... |
@@ -111,7 +112,7 @@ static int amr_read_header(AVFormatContext *s, |
| 111 | 111 |
} |
| 112 | 112 |
st->codec->channels = 1; |
| 113 | 113 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 114 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 114 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 115 | 115 |
|
| 116 | 116 |
return 0; |
| 117 | 117 |
} |
| ... | ... |
@@ -26,6 +26,7 @@ |
| 26 | 26 |
|
| 27 | 27 |
#include "libavutil/intreadwrite.h" |
| 28 | 28 |
#include "avformat.h" |
| 29 |
+#include "internal.h" |
|
| 29 | 30 |
|
| 30 | 31 |
typedef struct {
|
| 31 | 32 |
int base_record; |
| ... | ... |
@@ -128,7 +129,7 @@ static int read_header(AVFormatContext *s, |
| 128 | 128 |
|
| 129 | 129 |
avio_skip(pb, 32); /* record_types */ |
| 130 | 130 |
st->nb_frames = avio_rl32(pb); |
| 131 |
- av_set_pts_info(st, 64, 1, avio_rl16(pb)); |
|
| 131 |
+ avpriv_set_pts_info(st, 64, 1, avio_rl16(pb)); |
|
| 132 | 132 |
avio_skip(pb, 58); |
| 133 | 133 |
|
| 134 | 134 |
/* color cycling and palette data */ |
| ... | ... |
@@ -24,6 +24,7 @@ |
| 24 | 24 |
|
| 25 | 25 |
#include "libavutil/intreadwrite.h" |
| 26 | 26 |
#include "avformat.h" |
| 27 |
+#include "internal.h" |
|
| 27 | 28 |
#include "apetag.h" |
| 28 | 29 |
|
| 29 | 30 |
/* The earliest and latest file formats supported by this library */ |
| ... | ... |
@@ -330,7 +331,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap) |
| 330 | 330 |
st->nb_frames = ape->totalframes; |
| 331 | 331 |
st->start_time = 0; |
| 332 | 332 |
st->duration = total_blocks / MAC_SUBFRAME_SIZE; |
| 333 |
- av_set_pts_info(st, 64, MAC_SUBFRAME_SIZE, ape->samplerate); |
|
| 333 |
+ avpriv_set_pts_info(st, 64, MAC_SUBFRAME_SIZE, ape->samplerate); |
|
| 334 | 334 |
|
| 335 | 335 |
st->codec->extradata = av_malloc(APE_EXTRADATA_SIZE); |
| 336 | 336 |
st->codec->extradata_size = APE_EXTRADATA_SIZE; |
| ... | ... |
@@ -28,6 +28,7 @@ |
| 28 | 28 |
#include "libavutil/mathematics.h" |
| 29 | 29 |
#include "libavcodec/mpegaudio.h" |
| 30 | 30 |
#include "avformat.h" |
| 31 |
+#include "internal.h" |
|
| 31 | 32 |
#include "avio_internal.h" |
| 32 | 33 |
#include "riff.h" |
| 33 | 34 |
#include "asf.h" |
| ... | ... |
@@ -230,7 +231,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) |
| 230 | 230 |
st = avformat_new_stream(s, NULL); |
| 231 | 231 |
if (!st) |
| 232 | 232 |
return AVERROR(ENOMEM); |
| 233 |
- av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */ |
|
| 233 |
+ avpriv_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */ |
|
| 234 | 234 |
asf_st = av_mallocz(sizeof(ASFStream)); |
| 235 | 235 |
if (!asf_st) |
| 236 | 236 |
return AVERROR(ENOMEM); |
| ... | ... |
@@ -19,6 +19,7 @@ |
| 19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | 20 |
*/ |
| 21 | 21 |
#include "avformat.h" |
| 22 |
+#include "internal.h" |
|
| 22 | 23 |
#include "riff.h" |
| 23 | 24 |
#include "asf.h" |
| 24 | 25 |
#include "avio_internal.h" |
| ... | ... |
@@ -321,7 +322,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data |
| 321 | 321 |
for(n=0;n<s->nb_streams;n++) {
|
| 322 | 322 |
enc = s->streams[n]->codec; |
| 323 | 323 |
|
| 324 |
- av_set_pts_info(s->streams[n], 32, 1, 1000); /* 32 bit pts in ms */ |
|
| 324 |
+ avpriv_set_pts_info(s->streams[n], 32, 1, 1000); /* 32 bit pts in ms */ |
|
| 325 | 325 |
|
| 326 | 326 |
bit_rate += enc->bit_rate; |
| 327 | 327 |
} |
| ... | ... |
@@ -86,7 +86,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 86 | 86 |
st = avformat_new_stream(s, NULL); |
| 87 | 87 |
if (!st) |
| 88 | 88 |
return -1; |
| 89 |
- av_set_pts_info(st, 64, 1, 100); |
|
| 89 |
+ avpriv_set_pts_info(st, 64, 1, 100); |
|
| 90 | 90 |
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; |
| 91 | 91 |
st->codec->codec_id= CODEC_ID_SSA; |
| 92 | 92 |
|
| ... | ... |
@@ -28,6 +28,7 @@ |
| 28 | 28 |
*/ |
| 29 | 29 |
|
| 30 | 30 |
#include "avformat.h" |
| 31 |
+#include "internal.h" |
|
| 31 | 32 |
#include "avio_internal.h" |
| 32 | 33 |
#include "pcm.h" |
| 33 | 34 |
#include "riff.h" |
| ... | ... |
@@ -159,7 +160,7 @@ static int au_read_header(AVFormatContext *s, |
| 159 | 159 |
st->codec->codec_id = codec; |
| 160 | 160 |
st->codec->channels = channels; |
| 161 | 161 |
st->codec->sample_rate = rate; |
| 162 |
- av_set_pts_info(st, 64, 1, rate); |
|
| 162 |
+ avpriv_set_pts_info(st, 64, 1, rate); |
|
| 163 | 163 |
return 0; |
| 164 | 164 |
} |
| 165 | 165 |
|
| ... | ... |
@@ -1540,18 +1540,14 @@ AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c); |
| 1540 | 1540 |
|
| 1541 | 1541 |
AVProgram *av_new_program(AVFormatContext *s, int id); |
| 1542 | 1542 |
|
| 1543 |
+#if FF_API_SET_PTS_INFO |
|
| 1543 | 1544 |
/** |
| 1544 |
- * Set the pts for a given stream. If the new values would be invalid |
|
| 1545 |
- * (<= 0), it leaves the AVStream unchanged. |
|
| 1546 |
- * |
|
| 1547 |
- * @param s stream |
|
| 1548 |
- * @param pts_wrap_bits number of bits effectively used by the pts |
|
| 1549 |
- * (used for wrap control, 33 is the value for MPEG) |
|
| 1550 |
- * @param pts_num numerator to convert to seconds (MPEG: 1) |
|
| 1551 |
- * @param pts_den denominator to convert to seconds (MPEG: 90000) |
|
| 1545 |
+ * @deprecated this function is not supposed to be called outside of lavf |
|
| 1552 | 1546 |
*/ |
| 1547 |
+attribute_deprecated |
|
| 1553 | 1548 |
void av_set_pts_info(AVStream *s, int pts_wrap_bits, |
| 1554 | 1549 |
unsigned int pts_num, unsigned int pts_den); |
| 1550 |
+#endif |
|
| 1555 | 1551 |
|
| 1556 | 1552 |
#define AVSEEK_FLAG_BACKWARD 1 ///< seek backward |
| 1557 | 1553 |
#define AVSEEK_FLAG_BYTE 2 ///< seeking based on position in bytes |
| ... | ... |
@@ -25,6 +25,7 @@ |
| 25 | 25 |
#include "libavutil/dict.h" |
| 26 | 26 |
#include "libavutil/avstring.h" |
| 27 | 27 |
#include "avformat.h" |
| 28 |
+#include "internal.h" |
|
| 28 | 29 |
#include "avi.h" |
| 29 | 30 |
#include "dv.h" |
| 30 | 31 |
#include "riff.h" |
| ... | ... |
@@ -502,7 +503,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 502 | 502 |
ast->scale = 1; |
| 503 | 503 |
} |
| 504 | 504 |
} |
| 505 |
- av_set_pts_info(st, 64, ast->scale, ast->rate); |
|
| 505 |
+ avpriv_set_pts_info(st, 64, ast->scale, ast->rate); |
|
| 506 | 506 |
|
| 507 | 507 |
ast->cum_len=avio_rl32(pb); /* start */ |
| 508 | 508 |
st->nb_frames = avio_rl32(pb); |
| ... | ... |
@@ -784,7 +785,7 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt) {
|
| 784 | 784 |
*st->codec = *ast->sub_ctx->streams[0]->codec; |
| 785 | 785 |
ast->sub_ctx->streams[0]->codec->extradata = NULL; |
| 786 | 786 |
time_base = ast->sub_ctx->streams[0]->time_base; |
| 787 |
- av_set_pts_info(st, 64, time_base.num, time_base.den); |
|
| 787 |
+ avpriv_set_pts_info(st, 64, time_base.num, time_base.den); |
|
| 788 | 788 |
} |
| 789 | 789 |
ast->sub_buffer = pkt->data; |
| 790 | 790 |
memset(pkt, 0, sizeof(*pkt)); |
| ... | ... |
@@ -19,6 +19,7 @@ |
| 19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | 20 |
*/ |
| 21 | 21 |
#include "avformat.h" |
| 22 |
+#include "internal.h" |
|
| 22 | 23 |
#include "avi.h" |
| 23 | 24 |
#include "avio_internal.h" |
| 24 | 25 |
#include "riff.h" |
| ... | ... |
@@ -256,7 +257,7 @@ static int avi_write_header(AVFormatContext *s) |
| 256 | 256 |
|
| 257 | 257 |
avio_wl32(pb, au_scale); /* scale */ |
| 258 | 258 |
avio_wl32(pb, au_byterate); /* rate */ |
| 259 |
- av_set_pts_info(s->streams[i], 64, au_scale, au_byterate); |
|
| 259 |
+ avpriv_set_pts_info(s->streams[i], 64, au_scale, au_byterate); |
|
| 260 | 260 |
|
| 261 | 261 |
avio_wl32(pb, 0); /* start */ |
| 262 | 262 |
avist->frames_hdr_strm = avio_tell(pb); /* remember this offset to fill later */ |
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 | 22 |
#include "avformat.h" |
| 23 |
+#include "internal.h" |
|
| 23 | 24 |
#include "riff.h" |
| 24 | 25 |
|
| 25 | 26 |
#include <windows.h> |
| ... | ... |
@@ -137,7 +138,7 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 137 | 137 |
|
| 138 | 138 |
st->codec->stream_codec_tag = stream->info.fccHandler; |
| 139 | 139 |
|
| 140 |
- av_set_pts_info(st, 64, info.dwScale, info.dwRate); |
|
| 140 |
+ avpriv_set_pts_info(st, 64, info.dwScale, info.dwRate); |
|
| 141 | 141 |
st->start_time = stream->info.dwStart; |
| 142 | 142 |
} |
| 143 | 143 |
} |
| ... | ... |
@@ -29,6 +29,7 @@ |
| 29 | 29 |
|
| 30 | 30 |
#include "libavutil/intreadwrite.h" |
| 31 | 31 |
#include "avformat.h" |
| 32 |
+#include "internal.h" |
|
| 32 | 33 |
#include "libavcodec/bethsoftvideo.h" |
| 33 | 34 |
|
| 34 | 35 |
typedef struct BVID_DemuxContext |
| ... | ... |
@@ -73,7 +74,7 @@ static int vid_read_header(AVFormatContext *s, |
| 73 | 73 |
stream = avformat_new_stream(s, NULL); |
| 74 | 74 |
if (!stream) |
| 75 | 75 |
return AVERROR(ENOMEM); |
| 76 |
- av_set_pts_info(stream, 32, 1, 60); // 16 ms increments, i.e. 60 fps |
|
| 76 |
+ avpriv_set_pts_info(stream, 32, 1, 60); // 16 ms increments, i.e. 60 fps |
|
| 77 | 77 |
stream->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 78 | 78 |
stream->codec->codec_id = CODEC_ID_BETHSOFTVID; |
| 79 | 79 |
stream->codec->width = avio_rl16(pb); |
| ... | ... |
@@ -28,6 +28,7 @@ |
| 28 | 28 |
|
| 29 | 29 |
#include "libavutil/intreadwrite.h" |
| 30 | 30 |
#include "avformat.h" |
| 31 |
+#include "internal.h" |
|
| 31 | 32 |
|
| 32 | 33 |
typedef struct BFIContext {
|
| 33 | 34 |
int nframes; |
| ... | ... |
@@ -86,7 +87,7 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap) |
| 86 | 86 |
astream->codec->sample_rate = avio_rl32(pb); |
| 87 | 87 |
|
| 88 | 88 |
/* Set up the video codec... */ |
| 89 |
- av_set_pts_info(vstream, 32, 1, fps); |
|
| 89 |
+ avpriv_set_pts_info(vstream, 32, 1, fps); |
|
| 90 | 90 |
vstream->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 91 | 91 |
vstream->codec->codec_id = CODEC_ID_BFI; |
| 92 | 92 |
vstream->codec->pix_fmt = PIX_FMT_PAL8; |
| ... | ... |
@@ -99,7 +100,7 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap) |
| 99 | 99 |
astream->codec->bit_rate = |
| 100 | 100 |
astream->codec->sample_rate * astream->codec->bits_per_coded_sample; |
| 101 | 101 |
avio_seek(pb, chunk_header - 3, SEEK_SET); |
| 102 |
- av_set_pts_info(astream, 64, 1, astream->codec->sample_rate); |
|
| 102 |
+ avpriv_set_pts_info(astream, 64, 1, astream->codec->sample_rate); |
|
| 103 | 103 |
return 0; |
| 104 | 104 |
} |
| 105 | 105 |
|
| ... | ... |
@@ -30,6 +30,7 @@ |
| 30 | 30 |
|
| 31 | 31 |
#include "libavutil/intreadwrite.h" |
| 32 | 32 |
#include "avformat.h" |
| 33 |
+#include "internal.h" |
|
| 33 | 34 |
|
| 34 | 35 |
enum BinkAudFlags {
|
| 35 | 36 |
BINK_AUD_16BITS = 0x4000, ///< prefer 16-bit output |
| ... | ... |
@@ -109,7 +110,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 109 | 109 |
av_log(s, AV_LOG_ERROR, "invalid header: invalid fps (%d/%d)\n", fps_num, fps_den); |
| 110 | 110 |
return AVERROR(EIO); |
| 111 | 111 |
} |
| 112 |
- av_set_pts_info(vst, 64, fps_den, fps_num); |
|
| 112 |
+ avpriv_set_pts_info(vst, 64, fps_den, fps_num); |
|
| 113 | 113 |
|
| 114 | 114 |
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 115 | 115 |
vst->codec->codec_id = CODEC_ID_BINKVIDEO; |
| ... | ... |
@@ -136,7 +137,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 136 | 136 |
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 137 | 137 |
ast->codec->codec_tag = 0; |
| 138 | 138 |
ast->codec->sample_rate = avio_rl16(pb); |
| 139 |
- av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); |
|
| 139 |
+ avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate); |
|
| 140 | 140 |
flags = avio_rl16(pb); |
| 141 | 141 |
ast->codec->codec_id = flags & BINK_AUD_USEDCT ? |
| 142 | 142 |
CODEC_ID_BINKAUDIO_DCT : CODEC_ID_BINKAUDIO_RDFT; |
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 | 22 |
#include "avformat.h" |
| 23 |
+#include "internal.h" |
|
| 23 | 24 |
|
| 24 | 25 |
enum BMVFlags {
|
| 25 | 26 |
BMV_NOP = 0, |
| ... | ... |
@@ -50,7 +51,7 @@ static int bmv_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 50 | 50 |
st->codec->width = 640; |
| 51 | 51 |
st->codec->height = 429; |
| 52 | 52 |
st->codec->pix_fmt = PIX_FMT_PAL8; |
| 53 |
- av_set_pts_info(st, 16, 1, 12); |
|
| 53 |
+ avpriv_set_pts_info(st, 16, 1, 12); |
|
| 54 | 54 |
ast = avformat_new_stream(s, 0); |
| 55 | 55 |
if (!ast) |
| 56 | 56 |
return AVERROR(ENOMEM); |
| ... | ... |
@@ -58,7 +59,7 @@ static int bmv_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 58 | 58 |
ast->codec->codec_id = CODEC_ID_BMV_AUDIO; |
| 59 | 59 |
ast->codec->channels = 2; |
| 60 | 60 |
ast->codec->sample_rate = 22050; |
| 61 |
- av_set_pts_info(ast, 16, 1, 22050); |
|
| 61 |
+ avpriv_set_pts_info(ast, 16, 1, 22050); |
|
| 62 | 62 |
|
| 63 | 63 |
c->get_next = 1; |
| 64 | 64 |
c->audio_pos = 0; |
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 | 22 |
#include "avformat.h" |
| 23 |
+#include "internal.h" |
|
| 23 | 24 |
#include "voc.h" |
| 24 | 25 |
#include "libavutil/intreadwrite.h" |
| 25 | 26 |
|
| ... | ... |
@@ -89,7 +90,7 @@ static int read_header(AVFormatContext *s, |
| 89 | 89 |
video->codec->height = 192; |
| 90 | 90 |
/* 4:3 320x200 with 8 empty lines */ |
| 91 | 91 |
video->sample_aspect_ratio = (AVRational) { 5, 6 };
|
| 92 |
- av_set_pts_info(video, 64, 2, 25); |
|
| 92 |
+ avpriv_set_pts_info(video, 64, 2, 25); |
|
| 93 | 93 |
video->nb_frames = framecount; |
| 94 | 94 |
video->duration = framecount; |
| 95 | 95 |
video->start_time = 0; |
| ... | ... |
@@ -26,6 +26,7 @@ |
| 26 | 26 |
*/ |
| 27 | 27 |
|
| 28 | 28 |
#include "avformat.h" |
| 29 |
+#include "internal.h" |
|
| 29 | 30 |
#include "riff.h" |
| 30 | 31 |
#include "isom.h" |
| 31 | 32 |
#include "libavutil/intreadwrite.h" |
| ... | ... |
@@ -287,7 +288,7 @@ static int read_header(AVFormatContext *s, |
| 287 | 287 |
return AVERROR_INVALIDDATA; |
| 288 | 288 |
} |
| 289 | 289 |
|
| 290 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 290 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 291 | 291 |
st->start_time = 0; |
| 292 | 292 |
|
| 293 | 293 |
/* position the stream at the start of data */ |
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 | 22 |
#include "avformat.h" |
| 23 |
+#include "internal.h" |
|
| 23 | 24 |
|
| 24 | 25 |
#define CDG_PACKET_SIZE 24 |
| 25 | 26 |
#define CDG_COMMAND 0x09 |
| ... | ... |
@@ -38,7 +39,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 38 | 38 |
vst->codec->codec_id = CODEC_ID_CDGRAPHICS; |
| 39 | 39 |
|
| 40 | 40 |
/// 75 sectors/sec * 4 packets/sector = 300 packets/sec |
| 41 |
- av_set_pts_info(vst, 32, 1, 300); |
|
| 41 |
+ avpriv_set_pts_info(vst, 32, 1, 300); |
|
| 42 | 42 |
|
| 43 | 43 |
ret = avio_size(s->pb); |
| 44 | 44 |
if (ret > 0) |
| ... | ... |
@@ -21,6 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
#include "libavutil/intreadwrite.h" |
| 23 | 23 |
#include "avformat.h" |
| 24 |
+#include "internal.h" |
|
| 24 | 25 |
|
| 25 | 26 |
static int dfa_probe(AVProbeData *p) |
| 26 | 27 |
{
|
| ... | ... |
@@ -58,7 +59,7 @@ static int dfa_read_header(AVFormatContext *s, |
| 58 | 58 |
av_log(s, AV_LOG_WARNING, "Zero FPS reported, defaulting to 10\n"); |
| 59 | 59 |
mspf = 100; |
| 60 | 60 |
} |
| 61 |
- av_set_pts_info(st, 24, mspf, 1000); |
|
| 61 |
+ avpriv_set_pts_info(st, 24, mspf, 1000); |
|
| 62 | 62 |
avio_skip(pb, 128 - 16); // padding |
| 63 | 63 |
st->duration = frames; |
| 64 | 64 |
|
| ... | ... |
@@ -26,6 +26,7 @@ |
| 26 | 26 |
|
| 27 | 27 |
#include "libavutil/intreadwrite.h" |
| 28 | 28 |
#include "avformat.h" |
| 29 |
+#include "internal.h" |
|
| 29 | 30 |
|
| 30 | 31 |
|
| 31 | 32 |
typedef struct CinFileHeader {
|
| ... | ... |
@@ -111,7 +112,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 111 | 111 |
if (!st) |
| 112 | 112 |
return AVERROR(ENOMEM); |
| 113 | 113 |
|
| 114 |
- av_set_pts_info(st, 32, 1, 12); |
|
| 114 |
+ avpriv_set_pts_info(st, 32, 1, 12); |
|
| 115 | 115 |
cin->video_stream_index = st->index; |
| 116 | 116 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 117 | 117 |
st->codec->codec_id = CODEC_ID_DSICINVIDEO; |
| ... | ... |
@@ -124,7 +125,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 124 | 124 |
if (!st) |
| 125 | 125 |
return AVERROR(ENOMEM); |
| 126 | 126 |
|
| 127 |
- av_set_pts_info(st, 32, 1, 22050); |
|
| 127 |
+ avpriv_set_pts_info(st, 32, 1, 22050); |
|
| 128 | 128 |
cin->audio_stream_index = st->index; |
| 129 | 129 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 130 | 130 |
st->codec->codec_id = CODEC_ID_DSICINAUDIO; |
| ... | ... |
@@ -30,6 +30,7 @@ |
| 30 | 30 |
*/ |
| 31 | 31 |
#include <time.h> |
| 32 | 32 |
#include "avformat.h" |
| 33 |
+#include "internal.h" |
|
| 33 | 34 |
#include "libavcodec/dvdata.h" |
| 34 | 35 |
#include "libavutil/intreadwrite.h" |
| 35 | 36 |
#include "libavutil/mathematics.h" |
| ... | ... |
@@ -214,7 +215,7 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame) |
| 214 | 214 |
c->ast[i] = avformat_new_stream(c->fctx, NULL); |
| 215 | 215 |
if (!c->ast[i]) |
| 216 | 216 |
break; |
| 217 |
- av_set_pts_info(c->ast[i], 64, 1, 30000); |
|
| 217 |
+ avpriv_set_pts_info(c->ast[i], 64, 1, 30000); |
|
| 218 | 218 |
c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 219 | 219 |
c->ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE; |
| 220 | 220 |
|
| ... | ... |
@@ -244,7 +245,7 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame) |
| 244 | 244 |
if (c->sys) {
|
| 245 | 245 |
avctx = c->vst->codec; |
| 246 | 246 |
|
| 247 |
- av_set_pts_info(c->vst, 64, c->sys->time_base.num, |
|
| 247 |
+ avpriv_set_pts_info(c->vst, 64, c->sys->time_base.num, |
|
| 248 | 248 |
c->sys->time_base.den); |
| 249 | 249 |
avctx->time_base= c->sys->time_base; |
| 250 | 250 |
if (!avctx->width){
|
| ... | ... |
@@ -21,6 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
#include "libavutil/intreadwrite.h" |
| 23 | 23 |
#include "avformat.h" |
| 24 |
+#include "internal.h" |
|
| 24 | 25 |
#include "riff.h" |
| 25 | 26 |
|
| 26 | 27 |
#define DXA_EXTRA_SIZE 9 |
| ... | ... |
@@ -127,7 +128,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 127 | 127 |
st->codec->width = w; |
| 128 | 128 |
st->codec->height = h; |
| 129 | 129 |
av_reduce(&den, &num, den, num, (1UL<<31)-1); |
| 130 |
- av_set_pts_info(st, 33, num, den); |
|
| 130 |
+ avpriv_set_pts_info(st, 33, num, den); |
|
| 131 | 131 |
/* flags & 0x80 means that image is interlaced, |
| 132 | 132 |
* flags & 0x40 means that image has double height |
| 133 | 133 |
* either way set true height |
| ... | ... |
@@ -29,6 +29,7 @@ |
| 29 | 29 |
*/ |
| 30 | 30 |
|
| 31 | 31 |
#include "avformat.h" |
| 32 |
+#include "internal.h" |
|
| 32 | 33 |
|
| 33 | 34 |
typedef struct {
|
| 34 | 35 |
unsigned int channels; |
| ... | ... |
@@ -72,7 +73,7 @@ static int cdata_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 72 | 72 |
st->codec->codec_id = CODEC_ID_ADPCM_EA_XAS; |
| 73 | 73 |
st->codec->channels = cdata->channels; |
| 74 | 74 |
st->codec->sample_rate = sample_rate; |
| 75 |
- av_set_pts_info(st, 64, 1, sample_rate); |
|
| 75 |
+ avpriv_set_pts_info(st, 64, 1, sample_rate); |
|
| 76 | 76 |
|
| 77 | 77 |
cdata->audio_pts = 0; |
| 78 | 78 |
return 0; |
| ... | ... |
@@ -27,6 +27,7 @@ |
| 27 | 27 |
|
| 28 | 28 |
#include "libavutil/intreadwrite.h" |
| 29 | 29 |
#include "avformat.h" |
| 30 |
+#include "internal.h" |
|
| 30 | 31 |
|
| 31 | 32 |
#define SCHl_TAG MKTAG('S', 'C', 'H', 'l')
|
| 32 | 33 |
#define SEAD_TAG MKTAG('S', 'E', 'A', 'D') /* Sxxx header */
|
| ... | ... |
@@ -438,7 +439,7 @@ static int ea_read_header(AVFormatContext *s, |
| 438 | 438 |
st = avformat_new_stream(s, NULL); |
| 439 | 439 |
if (!st) |
| 440 | 440 |
return AVERROR(ENOMEM); |
| 441 |
- av_set_pts_info(st, 33, 1, ea->sample_rate); |
|
| 441 |
+ avpriv_set_pts_info(st, 33, 1, ea->sample_rate); |
|
| 442 | 442 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 443 | 443 |
st->codec->codec_id = ea->audio_codec; |
| 444 | 444 |
st->codec->codec_tag = 0; /* no tag */ |
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include "libavutil/intreadwrite.h" |
| 23 | 23 |
#include "libavutil/intfloat_readwrite.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
#include "ffm.h" |
| 26 | 27 |
#if CONFIG_AVSERVER |
| 27 | 28 |
#include <unistd.h> |
| ... | ... |
@@ -294,7 +295,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 294 | 294 |
if (!st) |
| 295 | 295 |
goto fail; |
| 296 | 296 |
|
| 297 |
- av_set_pts_info(st, 64, 1, 1000000); |
|
| 297 |
+ avpriv_set_pts_info(st, 64, 1, 1000000); |
|
| 298 | 298 |
|
| 299 | 299 |
codec = st->codec; |
| 300 | 300 |
/* generic info */ |
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include "libavutil/intreadwrite.h" |
| 23 | 23 |
#include "libavutil/intfloat_readwrite.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
#include "ffm.h" |
| 26 | 27 |
|
| 27 | 28 |
static void flush_packet(AVFormatContext *s) |
| ... | ... |
@@ -107,7 +108,7 @@ static int ffm_write_header(AVFormatContext *s) |
| 107 | 107 |
/* list of streams */ |
| 108 | 108 |
for(i=0;i<s->nb_streams;i++) {
|
| 109 | 109 |
st = s->streams[i]; |
| 110 |
- av_set_pts_info(st, 64, 1, 1000000); |
|
| 110 |
+ avpriv_set_pts_info(st, 64, 1, 1000000); |
|
| 111 | 111 |
|
| 112 | 112 |
codec = st->codec; |
| 113 | 113 |
/* generic info */ |
| ... | ... |
@@ -26,6 +26,7 @@ |
| 26 | 26 |
|
| 27 | 27 |
#include "libavutil/intreadwrite.h" |
| 28 | 28 |
#include "avformat.h" |
| 29 |
+#include "internal.h" |
|
| 29 | 30 |
|
| 30 | 31 |
#define RAND_TAG MKBETAG('R','a','n','d')
|
| 31 | 32 |
|
| ... | ... |
@@ -67,7 +68,7 @@ static int read_header(AVFormatContext *s, |
| 67 | 67 |
st->codec->width = avio_rb16(pb); |
| 68 | 68 |
st->codec->height = avio_rb16(pb); |
| 69 | 69 |
film->leading = avio_rb16(pb); |
| 70 |
- av_set_pts_info(st, 64, 1, avio_rb16(pb)); |
|
| 70 |
+ avpriv_set_pts_info(st, 64, 1, avio_rb16(pb)); |
|
| 71 | 71 |
|
| 72 | 72 |
avio_seek(pb, 0, SEEK_SET); |
| 73 | 73 |
|
| ... | ... |
@@ -21,6 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
#include "libavcodec/flac.h" |
| 23 | 23 |
#include "avformat.h" |
| 24 |
+#include "internal.h" |
|
| 24 | 25 |
#include "rawdec.h" |
| 25 | 26 |
#include "oggdec.h" |
| 26 | 27 |
#include "vorbiscomment.h" |
| ... | ... |
@@ -91,7 +92,7 @@ static int flac_read_header(AVFormatContext *s, |
| 91 | 91 |
|
| 92 | 92 |
/* set time base and duration */ |
| 93 | 93 |
if (si.samplerate > 0) {
|
| 94 |
- av_set_pts_info(st, 64, 1, si.samplerate); |
|
| 94 |
+ avpriv_set_pts_info(st, 64, 1, si.samplerate); |
|
| 95 | 95 |
if (si.samples > 0) |
| 96 | 96 |
st->duration = si.samples; |
| 97 | 97 |
} |
| ... | ... |
@@ -34,6 +34,7 @@ |
| 34 | 34 |
#include "libavutil/intreadwrite.h" |
| 35 | 35 |
#include "libavutil/audioconvert.h" |
| 36 | 36 |
#include "avformat.h" |
| 37 |
+#include "internal.h" |
|
| 37 | 38 |
|
| 38 | 39 |
#define FLIC_FILE_MAGIC_1 0xAF11 |
| 39 | 40 |
#define FLIC_FILE_MAGIC_2 0xAF12 |
| ... | ... |
@@ -167,10 +168,10 @@ static int flic_read_header(AVFormatContext *s, |
| 167 | 167 |
/* Since the header information is incorrect we have to figure out the |
| 168 | 168 |
* framerate using block_align and the fact that the audio is 22050 Hz. |
| 169 | 169 |
* We usually have two cases: 2205 -> 10 fps and 1470 -> 15 fps */ |
| 170 |
- av_set_pts_info(st, 64, ast->codec->block_align, FLIC_TFTD_SAMPLE_RATE); |
|
| 171 |
- av_set_pts_info(ast, 64, 1, FLIC_TFTD_SAMPLE_RATE); |
|
| 170 |
+ avpriv_set_pts_info(st, 64, ast->codec->block_align, FLIC_TFTD_SAMPLE_RATE); |
|
| 171 |
+ avpriv_set_pts_info(ast, 64, 1, FLIC_TFTD_SAMPLE_RATE); |
|
| 172 | 172 |
} else if (AV_RL16(&header[0x10]) == FLIC_CHUNK_MAGIC_1) {
|
| 173 |
- av_set_pts_info(st, 64, FLIC_MC_SPEED, 70); |
|
| 173 |
+ avpriv_set_pts_info(st, 64, FLIC_MC_SPEED, 70); |
|
| 174 | 174 |
|
| 175 | 175 |
/* rewind the stream since the first chunk is at offset 12 */ |
| 176 | 176 |
avio_seek(pb, 12, SEEK_SET); |
| ... | ... |
@@ -182,10 +183,10 @@ static int flic_read_header(AVFormatContext *s, |
| 182 | 182 |
memcpy(st->codec->extradata, header, 12); |
| 183 | 183 |
|
| 184 | 184 |
} else if (magic_number == FLIC_FILE_MAGIC_1) {
|
| 185 |
- av_set_pts_info(st, 64, speed, 70); |
|
| 185 |
+ avpriv_set_pts_info(st, 64, speed, 70); |
|
| 186 | 186 |
} else if ((magic_number == FLIC_FILE_MAGIC_2) || |
| 187 | 187 |
(magic_number == FLIC_FILE_MAGIC_3)) {
|
| 188 |
- av_set_pts_info(st, 64, speed, 1000); |
|
| 188 |
+ avpriv_set_pts_info(st, 64, speed, 1000); |
|
| 189 | 189 |
} else {
|
| 190 | 190 |
av_log(s, AV_LOG_INFO, "Invalid or unsupported magic chunk in file\n"); |
| 191 | 191 |
return AVERROR_INVALIDDATA; |
| ... | ... |
@@ -31,6 +31,7 @@ |
| 31 | 31 |
#include "libavcodec/bytestream.h" |
| 32 | 32 |
#include "libavcodec/mpeg4audio.h" |
| 33 | 33 |
#include "avformat.h" |
| 34 |
+#include "internal.h" |
|
| 34 | 35 |
#include "avio_internal.h" |
| 35 | 36 |
#include "flv.h" |
| 36 | 37 |
|
| ... | ... |
@@ -360,7 +361,7 @@ static AVStream *create_stream(AVFormatContext *s, int is_audio){
|
| 360 | 360 |
return NULL; |
| 361 | 361 |
st->id = is_audio; |
| 362 | 362 |
st->codec->codec_type = is_audio ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO; |
| 363 |
- av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */ |
|
| 363 |
+ avpriv_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */ |
|
| 364 | 364 |
return st; |
| 365 | 365 |
} |
| 366 | 366 |
|
| ... | ... |
@@ -199,7 +199,7 @@ static int flv_write_header(AVFormatContext *s) |
| 199 | 199 |
if(get_audio_flags(enc)<0) |
| 200 | 200 |
return -1; |
| 201 | 201 |
} |
| 202 |
- av_set_pts_info(s->streams[i], 32, 1, 1000); /* 32 bit pts in ms */ |
|
| 202 |
+ avpriv_set_pts_info(s->streams[i], 32, 1, 1000); /* 32 bit pts in ms */ |
|
| 203 | 203 |
|
| 204 | 204 |
sc = av_mallocz(sizeof(FLVStreamContext)); |
| 205 | 205 |
if (!sc) |
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include "libavutil/mathematics.h" |
| 23 | 23 |
#include "libavutil/opt.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
|
| 26 | 27 |
#define GSM_BLOCK_SIZE 33 |
| 27 | 28 |
#define GSM_BLOCK_SAMPLES 160 |
| ... | ... |
@@ -67,7 +68,7 @@ static int gsm_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 67 | 67 |
st->codec->block_align = GSM_BLOCK_SIZE; |
| 68 | 68 |
st->codec->bit_rate = GSM_BLOCK_SIZE * 8 * c->sample_rate / GSM_BLOCK_SAMPLES; |
| 69 | 69 |
|
| 70 |
- av_set_pts_info(st, 64, GSM_BLOCK_SAMPLES, GSM_SAMPLE_RATE); |
|
| 70 |
+ avpriv_set_pts_info(st, 64, GSM_BLOCK_SAMPLES, GSM_SAMPLE_RATE); |
|
| 71 | 71 |
|
| 72 | 72 |
return 0; |
| 73 | 73 |
} |
| ... | ... |
@@ -362,7 +362,7 @@ static int gxf_header(AVFormatContext *s, AVFormatParameters *ap) {
|
| 362 | 362 |
main_timebase = (AVRational){1001, 60000};
|
| 363 | 363 |
for (i = 0; i < s->nb_streams; i++) {
|
| 364 | 364 |
AVStream *st = s->streams[i]; |
| 365 |
- av_set_pts_info(st, 32, main_timebase.num, main_timebase.den); |
|
| 365 |
+ avpriv_set_pts_info(st, 32, main_timebase.num, main_timebase.den); |
|
| 366 | 366 |
} |
| 367 | 367 |
return 0; |
| 368 | 368 |
} |
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include "libavutil/intfloat_readwrite.h" |
| 23 | 23 |
#include "libavutil/mathematics.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
#include "gxf.h" |
| 26 | 27 |
#include "riff.h" |
| 27 | 28 |
#include "audiointerleave.h" |
| ... | ... |
@@ -676,7 +677,7 @@ static int gxf_write_header(AVFormatContext *s) |
| 676 | 676 |
} |
| 677 | 677 |
sc->track_type = 2; |
| 678 | 678 |
sc->sample_rate = st->codec->sample_rate; |
| 679 |
- av_set_pts_info(st, 64, 1, sc->sample_rate); |
|
| 679 |
+ avpriv_set_pts_info(st, 64, 1, sc->sample_rate); |
|
| 680 | 680 |
sc->sample_size = 16; |
| 681 | 681 |
sc->frame_rate_index = -2; |
| 682 | 682 |
sc->lines_index = -2; |
| ... | ... |
@@ -706,7 +707,7 @@ static int gxf_write_header(AVFormatContext *s) |
| 706 | 706 |
"gxf muxer only accepts PAL or NTSC resolutions currently\n"); |
| 707 | 707 |
return -1; |
| 708 | 708 |
} |
| 709 |
- av_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den); |
|
| 709 |
+ avpriv_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den); |
|
| 710 | 710 |
if (gxf_find_lines_index(st) < 0) |
| 711 | 711 |
sc->lines_index = -1; |
| 712 | 712 |
sc->sample_size = st->codec->bit_rate; |
| ... | ... |
@@ -70,6 +70,7 @@ |
| 70 | 70 |
|
| 71 | 71 |
#include "libavutil/intreadwrite.h" |
| 72 | 72 |
#include "avformat.h" |
| 73 |
+#include "internal.h" |
|
| 73 | 74 |
|
| 74 | 75 |
#define HUFFMAN_TABLE_SIZE (64 * 1024) |
| 75 | 76 |
#define IDCIN_FPS 14 |
| ... | ... |
@@ -156,7 +157,7 @@ static int idcin_read_header(AVFormatContext *s, |
| 156 | 156 |
st = avformat_new_stream(s, NULL); |
| 157 | 157 |
if (!st) |
| 158 | 158 |
return AVERROR(ENOMEM); |
| 159 |
- av_set_pts_info(st, 33, 1, IDCIN_FPS); |
|
| 159 |
+ avpriv_set_pts_info(st, 33, 1, IDCIN_FPS); |
|
| 160 | 160 |
idcin->video_stream_index = st->index; |
| 161 | 161 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 162 | 162 |
st->codec->codec_id = CODEC_ID_IDCIN; |
| ... | ... |
@@ -177,7 +178,7 @@ static int idcin_read_header(AVFormatContext *s, |
| 177 | 177 |
st = avformat_new_stream(s, NULL); |
| 178 | 178 |
if (!st) |
| 179 | 179 |
return AVERROR(ENOMEM); |
| 180 |
- av_set_pts_info(st, 33, 1, IDCIN_FPS); |
|
| 180 |
+ avpriv_set_pts_info(st, 33, 1, IDCIN_FPS); |
|
| 181 | 181 |
idcin->audio_stream_index = st->index; |
| 182 | 182 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 183 | 183 |
st->codec->codec_tag = 1; |
| ... | ... |
@@ -29,6 +29,7 @@ |
| 29 | 29 |
|
| 30 | 30 |
#include "libavutil/intreadwrite.h" |
| 31 | 31 |
#include "avformat.h" |
| 32 |
+#include "internal.h" |
|
| 32 | 33 |
|
| 33 | 34 |
#define RoQ_MAGIC_NUMBER 0x1084 |
| 34 | 35 |
#define RoQ_CHUNK_PREAMBLE_SIZE 8 |
| ... | ... |
@@ -87,7 +88,7 @@ static int roq_read_header(AVFormatContext *s, |
| 87 | 87 |
st = avformat_new_stream(s, NULL); |
| 88 | 88 |
if (!st) |
| 89 | 89 |
return AVERROR(ENOMEM); |
| 90 |
- av_set_pts_info(st, 63, 1, framerate); |
|
| 90 |
+ avpriv_set_pts_info(st, 63, 1, framerate); |
|
| 91 | 91 |
roq->video_stream_index = st->index; |
| 92 | 92 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 93 | 93 |
st->codec->codec_id = CODEC_ID_ROQ; |
| ... | ... |
@@ -169,7 +170,7 @@ static int roq_read_packet(AVFormatContext *s, |
| 169 | 169 |
AVStream *st = avformat_new_stream(s, NULL); |
| 170 | 170 |
if (!st) |
| 171 | 171 |
return AVERROR(ENOMEM); |
| 172 |
- av_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE); |
|
| 172 |
+ avpriv_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE); |
|
| 173 | 173 |
roq->audio_stream_index = st->index; |
| 174 | 174 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 175 | 175 |
st->codec->codec_id = CODEC_ID_ROQ_DPCM; |
| ... | ... |
@@ -32,6 +32,7 @@ |
| 32 | 32 |
#include "libavutil/intreadwrite.h" |
| 33 | 33 |
#include "libavutil/dict.h" |
| 34 | 34 |
#include "avformat.h" |
| 35 |
+#include "internal.h" |
|
| 35 | 36 |
|
| 36 | 37 |
#define ID_8SVX MKTAG('8','S','V','X')
|
| 37 | 38 |
#define ID_VHDR MKTAG('V','H','D','R')
|
| ... | ... |
@@ -216,7 +217,7 @@ static int iff_read_header(AVFormatContext *s, |
| 216 | 216 |
|
| 217 | 217 |
switch(st->codec->codec_type) {
|
| 218 | 218 |
case AVMEDIA_TYPE_AUDIO: |
| 219 |
- av_set_pts_info(st, 32, 1, st->codec->sample_rate); |
|
| 219 |
+ avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate); |
|
| 220 | 220 |
|
| 221 | 221 |
switch(compression) {
|
| 222 | 222 |
case COMP_NONE: |
| ... | ... |
@@ -250,7 +250,7 @@ static int read_header(AVFormatContext *s1, AVFormatParameters *ap) |
| 250 | 250 |
st->need_parsing = AVSTREAM_PARSE_FULL; |
| 251 | 251 |
} |
| 252 | 252 |
|
| 253 |
- av_set_pts_info(st, 60, framerate.den, framerate.num); |
|
| 253 |
+ avpriv_set_pts_info(st, 60, framerate.den, framerate.num); |
|
| 254 | 254 |
|
| 255 | 255 |
if (width && height) {
|
| 256 | 256 |
st->codec->width = width; |
| ... | ... |
@@ -286,4 +286,17 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, |
| 286 | 286 |
int flags, int64_t *ts_ret, |
| 287 | 287 |
int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )); |
| 288 | 288 |
|
| 289 |
+/** |
|
| 290 |
+ * Set the pts for a given stream. If the new values would be invalid |
|
| 291 |
+ * (<= 0), it leaves the AVStream unchanged. |
|
| 292 |
+ * |
|
| 293 |
+ * @param s stream |
|
| 294 |
+ * @param pts_wrap_bits number of bits effectively used by the pts |
|
| 295 |
+ * (used for wrap control, 33 is the value for MPEG) |
|
| 296 |
+ * @param pts_num numerator to convert to seconds (MPEG: 1) |
|
| 297 |
+ * @param pts_den denominator to convert to seconds (MPEG: 90000) |
|
| 298 |
+ */ |
|
| 299 |
+void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits, |
|
| 300 |
+ unsigned int pts_num, unsigned int pts_den); |
|
| 301 |
+ |
|
| 289 | 302 |
#endif /* AVFORMAT_INTERNAL_H */ |
| ... | ... |
@@ -34,6 +34,7 @@ |
| 34 | 34 |
|
| 35 | 35 |
#include "libavutil/intreadwrite.h" |
| 36 | 36 |
#include "avformat.h" |
| 37 |
+#include "internal.h" |
|
| 37 | 38 |
|
| 38 | 39 |
#define CHUNK_PREAMBLE_SIZE 4 |
| 39 | 40 |
#define OPCODE_PREAMBLE_SIZE 4 |
| ... | ... |
@@ -562,7 +563,7 @@ static int ipmovie_read_header(AVFormatContext *s, |
| 562 | 562 |
st = avformat_new_stream(s, NULL); |
| 563 | 563 |
if (!st) |
| 564 | 564 |
return AVERROR(ENOMEM); |
| 565 |
- av_set_pts_info(st, 63, 1, 1000000); |
|
| 565 |
+ avpriv_set_pts_info(st, 63, 1, 1000000); |
|
| 566 | 566 |
ipmovie->video_stream_index = st->index; |
| 567 | 567 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 568 | 568 |
st->codec->codec_id = CODEC_ID_INTERPLAY_VIDEO; |
| ... | ... |
@@ -575,7 +576,7 @@ static int ipmovie_read_header(AVFormatContext *s, |
| 575 | 575 |
st = avformat_new_stream(s, NULL); |
| 576 | 576 |
if (!st) |
| 577 | 577 |
return AVERROR(ENOMEM); |
| 578 |
- av_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate); |
|
| 578 |
+ avpriv_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate); |
|
| 579 | 579 |
ipmovie->audio_stream_index = st->index; |
| 580 | 580 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 581 | 581 |
st->codec->codec_id = ipmovie->audio_type; |
| ... | ... |
@@ -27,6 +27,7 @@ |
| 27 | 27 |
*/ |
| 28 | 28 |
|
| 29 | 29 |
#include "avformat.h" |
| 30 |
+#include "internal.h" |
|
| 30 | 31 |
#include "libavutil/avstring.h" |
| 31 | 32 |
|
| 32 | 33 |
#define ISS_SIG "IMA_ADPCM_Sound" |
| ... | ... |
@@ -101,7 +102,7 @@ static av_cold int iss_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 101 | 101 |
st->codec->bit_rate = st->codec->channels * st->codec->sample_rate |
| 102 | 102 |
* st->codec->bits_per_coded_sample; |
| 103 | 103 |
st->codec->block_align = iss->packet_size; |
| 104 |
- av_set_pts_info(st, 32, 1, st->codec->sample_rate); |
|
| 104 |
+ avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate); |
|
| 105 | 105 |
|
| 106 | 106 |
return 0; |
| 107 | 107 |
} |
| ... | ... |
@@ -19,6 +19,7 @@ |
| 19 | 19 |
*/ |
| 20 | 20 |
|
| 21 | 21 |
#include "avformat.h" |
| 22 |
+#include "internal.h" |
|
| 22 | 23 |
|
| 23 | 24 |
|
| 24 | 25 |
static int probe(AVProbeData *p) |
| ... | ... |
@@ -47,7 +48,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 47 | 47 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 48 | 48 |
st->codec->codec_id = CODEC_ID_MPEG4; |
| 49 | 49 |
st->need_parsing = AVSTREAM_PARSE_FULL; |
| 50 |
- av_set_pts_info(st, 64, 1, 90000); |
|
| 50 |
+ avpriv_set_pts_info(st, 64, 1, 90000); |
|
| 51 | 51 |
|
| 52 | 52 |
return 0; |
| 53 | 53 |
|
| ... | ... |
@@ -19,6 +19,7 @@ |
| 19 | 19 |
*/ |
| 20 | 20 |
|
| 21 | 21 |
#include "avformat.h" |
| 22 |
+#include "internal.h" |
|
| 22 | 23 |
#include "riff.h" |
| 23 | 24 |
#include "libavutil/intreadwrite.h" |
| 24 | 25 |
|
| ... | ... |
@@ -61,7 +62,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 61 | 61 |
return AVERROR_INVALIDDATA; |
| 62 | 62 |
} |
| 63 | 63 |
|
| 64 |
- av_set_pts_info(st, 64, time_base.num, time_base.den); |
|
| 64 |
+ avpriv_set_pts_info(st, 64, time_base.num, time_base.den); |
|
| 65 | 65 |
|
| 66 | 66 |
return 0; |
| 67 | 67 |
} |
| ... | ... |
@@ -27,6 +27,7 @@ |
| 27 | 27 |
|
| 28 | 28 |
#include "libavutil/intreadwrite.h" |
| 29 | 29 |
#include "avformat.h" |
| 30 |
+#include "internal.h" |
|
| 30 | 31 |
|
| 31 | 32 |
#define JV_PREAMBLE_SIZE 5 |
| 32 | 33 |
|
| ... | ... |
@@ -81,7 +82,7 @@ static int read_header(AVFormatContext *s, |
| 81 | 81 |
vst->codec->height = avio_rl16(pb); |
| 82 | 82 |
vst->nb_frames = |
| 83 | 83 |
ast->nb_index_entries = avio_rl16(pb); |
| 84 |
- av_set_pts_info(vst, 64, avio_rl16(pb), 1000); |
|
| 84 |
+ avpriv_set_pts_info(vst, 64, avio_rl16(pb), 1000); |
|
| 85 | 85 |
|
| 86 | 86 |
avio_skip(pb, 4); |
| 87 | 87 |
|
| ... | ... |
@@ -90,7 +91,7 @@ static int read_header(AVFormatContext *s, |
| 90 | 90 |
ast->codec->codec_tag = 0; /* no fourcc */ |
| 91 | 91 |
ast->codec->sample_rate = avio_rl16(pb); |
| 92 | 92 |
ast->codec->channels = 1; |
| 93 |
- av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); |
|
| 93 |
+ avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate); |
|
| 94 | 94 |
|
| 95 | 95 |
avio_skip(pb, 10); |
| 96 | 96 |
|
| ... | ... |
@@ -26,6 +26,7 @@ |
| 26 | 26 |
*/ |
| 27 | 27 |
|
| 28 | 28 |
#include "avformat.h" |
| 29 |
+#include "internal.h" |
|
| 29 | 30 |
#include "riff.h" |
| 30 | 31 |
#include <libnut.h> |
| 31 | 32 |
|
| ... | ... |
@@ -92,7 +93,7 @@ static int nut_write_header(AVFormatContext * avf) {
|
| 92 | 92 |
for (j = 0; j < s[i].fourcc_len; j++) s[i].fourcc[j] = (fourcc >> (j*8)) & 0xFF; |
| 93 | 93 |
|
| 94 | 94 |
ff_parse_specific_params(codec, &num, &ssize, &denom); |
| 95 |
- av_set_pts_info(avf->streams[i], 60, denom, num); |
|
| 95 |
+ avpriv_set_pts_info(avf->streams[i], 60, denom, num); |
|
| 96 | 96 |
|
| 97 | 97 |
s[i].time_base.num = denom; |
| 98 | 98 |
s[i].time_base.den = num; |
| ... | ... |
@@ -226,7 +227,7 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
|
| 226 | 226 |
memcpy(st->codec->extradata, s[i].codec_specific, st->codec->extradata_size); |
| 227 | 227 |
} |
| 228 | 228 |
|
| 229 |
- av_set_pts_info(avf->streams[i], 60, s[i].time_base.num, s[i].time_base.den); |
|
| 229 |
+ avpriv_set_pts_info(avf->streams[i], 60, s[i].time_base.num, s[i].time_base.den); |
|
| 230 | 230 |
st->start_time = 0; |
| 231 | 231 |
st->duration = s[i].max_pts; |
| 232 | 232 |
|
| ... | ... |
@@ -24,6 +24,7 @@ |
| 24 | 24 |
|
| 25 | 25 |
#include "libavutil/intreadwrite.h" |
| 26 | 26 |
#include "avformat.h" |
| 27 |
+#include "internal.h" |
|
| 27 | 28 |
|
| 28 | 29 |
#define LMLM4_I_FRAME 0x00 |
| 29 | 30 |
#define LMLM4_P_FRAME 0x01 |
| ... | ... |
@@ -65,7 +66,7 @@ static int lmlm4_read_header(AVFormatContext *s, AVFormatParameters *ap) {
|
| 65 | 65 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 66 | 66 |
st->codec->codec_id = CODEC_ID_MPEG4; |
| 67 | 67 |
st->need_parsing = AVSTREAM_PARSE_HEADERS; |
| 68 |
- av_set_pts_info(st, 64, 1001, 30000); |
|
| 68 |
+ avpriv_set_pts_info(st, 64, 1001, 30000); |
|
| 69 | 69 |
|
| 70 | 70 |
if (!(st = avformat_new_stream(s, NULL))) |
| 71 | 71 |
return AVERROR(ENOMEM); |
| ... | ... |
@@ -21,6 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
#include "libavutil/intreadwrite.h" |
| 23 | 23 |
#include "avformat.h" |
| 24 |
+#include "internal.h" |
|
| 24 | 25 |
#include "riff.h" |
| 25 | 26 |
|
| 26 | 27 |
#define LXF_PACKET_HEADER_SIZE 60 |
| ... | ... |
@@ -174,14 +175,14 @@ static int get_packet_header(AVFormatContext *s, uint8_t *header, uint32_t *form |
| 174 | 174 |
//use audio packet size to determine video standard |
| 175 | 175 |
//for NTSC we have one 8008-sample audio frame per five video frames |
| 176 | 176 |
if (samples == LXF_SAMPLERATE * 5005 / 30000) {
|
| 177 |
- av_set_pts_info(s->streams[0], 64, 1001, 30000); |
|
| 177 |
+ avpriv_set_pts_info(s->streams[0], 64, 1001, 30000); |
|
| 178 | 178 |
} else {
|
| 179 | 179 |
//assume PAL, but warn if we don't have 1920 samples |
| 180 | 180 |
if (samples != LXF_SAMPLERATE / 25) |
| 181 | 181 |
av_log(s, AV_LOG_WARNING, |
| 182 | 182 |
"video doesn't seem to be PAL or NTSC. guessing PAL\n"); |
| 183 | 183 |
|
| 184 |
- av_set_pts_info(s->streams[0], 64, 1, 25); |
|
| 184 |
+ avpriv_set_pts_info(s->streams[0], 64, 1, 25); |
|
| 185 | 185 |
} |
| 186 | 186 |
|
| 187 | 187 |
//TODO: warning if track mask != (1 << channels) - 1? |
| ... | ... |
@@ -250,7 +251,7 @@ static int lxf_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 250 | 250 |
st->codec->sample_rate = LXF_SAMPLERATE; |
| 251 | 251 |
st->codec->channels = lxf->channels; |
| 252 | 252 |
|
| 253 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 253 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 254 | 254 |
} |
| 255 | 255 |
|
| 256 | 256 |
if (format == 1) {
|
| ... | ... |
@@ -1506,7 +1506,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 1506 | 1506 |
|
| 1507 | 1507 |
if (track->time_scale < 0.01) |
| 1508 | 1508 |
track->time_scale = 1.0; |
| 1509 |
- av_set_pts_info(st, 64, matroska->time_scale*track->time_scale, 1000*1000*1000); /* 64 bit pts in ns */ |
|
| 1509 |
+ avpriv_set_pts_info(st, 64, matroska->time_scale*track->time_scale, 1000*1000*1000); /* 64 bit pts in ns */ |
|
| 1510 | 1510 |
|
| 1511 | 1511 |
st->codec->codec_id = codec_id; |
| 1512 | 1512 |
st->start_time = 0; |
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 | 22 |
#include "avformat.h" |
| 23 |
+#include "internal.h" |
|
| 23 | 24 |
#include "riff.h" |
| 24 | 25 |
#include "isom.h" |
| 25 | 26 |
#include "matroska.h" |
| ... | ... |
@@ -662,7 +663,7 @@ static int mkv_write_tracks(AVFormatContext *s) |
| 662 | 662 |
end_ebml_master(pb, track); |
| 663 | 663 |
|
| 664 | 664 |
// ms precision is the de-facto standard timescale for mkv files |
| 665 |
- av_set_pts_info(st, 64, 1, 1000); |
|
| 665 |
+ avpriv_set_pts_info(st, 64, 1, 1000); |
|
| 666 | 666 |
} |
| 667 | 667 |
end_ebml_master(pb, tracks); |
| 668 | 668 |
return 0; |
| ... | ... |
@@ -33,6 +33,7 @@ |
| 33 | 33 |
|
| 34 | 34 |
#include "libavutil/intreadwrite.h" |
| 35 | 35 |
#include "avformat.h" |
| 36 |
+#include "internal.h" |
|
| 36 | 37 |
|
| 37 | 38 |
#define MM_PREAMBLE_SIZE 6 |
| 38 | 39 |
|
| ... | ... |
@@ -113,7 +114,7 @@ static int read_header(AVFormatContext *s, |
| 113 | 113 |
st->codec->codec_tag = 0; /* no fourcc */ |
| 114 | 114 |
st->codec->width = width; |
| 115 | 115 |
st->codec->height = height; |
| 116 |
- av_set_pts_info(st, 64, 1, frame_rate); |
|
| 116 |
+ avpriv_set_pts_info(st, 64, 1, frame_rate); |
|
| 117 | 117 |
|
| 118 | 118 |
/* audio stream */ |
| 119 | 119 |
if (length == MM_HEADER_LEN_AV) {
|
| ... | ... |
@@ -125,7 +126,7 @@ static int read_header(AVFormatContext *s, |
| 125 | 125 |
st->codec->codec_id = CODEC_ID_PCM_U8; |
| 126 | 126 |
st->codec->channels = 1; |
| 127 | 127 |
st->codec->sample_rate = 8000; |
| 128 |
- av_set_pts_info(st, 64, 1, 8000); /* 8000 hz */ |
|
| 128 |
+ avpriv_set_pts_info(st, 64, 1, 8000); /* 8000 hz */ |
|
| 129 | 129 |
} |
| 130 | 130 |
|
| 131 | 131 |
mm->audio_pts = 0; |
| ... | ... |
@@ -19,6 +19,7 @@ |
| 19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | 20 |
*/ |
| 21 | 21 |
#include "avformat.h" |
| 22 |
+#include "internal.h" |
|
| 22 | 23 |
#include "avio_internal.h" |
| 23 | 24 |
#include "pcm.h" |
| 24 | 25 |
#include "riff.h" |
| ... | ... |
@@ -100,7 +101,7 @@ static int mmf_write_header(AVFormatContext *s) |
| 100 | 100 |
|
| 101 | 101 |
mmf->awapos = ff_start_tag(pb, "Awa\x01"); |
| 102 | 102 |
|
| 103 |
- av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); |
|
| 103 |
+ avpriv_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); |
|
| 104 | 104 |
|
| 105 | 105 |
avio_flush(pb); |
| 106 | 106 |
|
| ... | ... |
@@ -252,7 +253,7 @@ static int mmf_read_header(AVFormatContext *s, |
| 252 | 252 |
st->codec->bits_per_coded_sample = 4; |
| 253 | 253 |
st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample; |
| 254 | 254 |
|
| 255 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 255 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 256 | 256 |
|
| 257 | 257 |
return 0; |
| 258 | 258 |
} |
| ... | ... |
@@ -31,6 +31,7 @@ |
| 31 | 31 |
#include "libavutil/avstring.h" |
| 32 | 32 |
#include "libavutil/dict.h" |
| 33 | 33 |
#include "avformat.h" |
| 34 |
+#include "internal.h" |
|
| 34 | 35 |
#include "avio_internal.h" |
| 35 | 36 |
#include "riff.h" |
| 36 | 37 |
#include "isom.h" |
| ... | ... |
@@ -1827,7 +1828,7 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) |
| 1827 | 1827 |
sc->time_scale = 1; |
| 1828 | 1828 |
} |
| 1829 | 1829 |
|
| 1830 |
- av_set_pts_info(st, 64, 1, sc->time_scale); |
|
| 1830 |
+ avpriv_set_pts_info(st, 64, 1, sc->time_scale); |
|
| 1831 | 1831 |
|
| 1832 | 1832 |
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && |
| 1833 | 1833 |
!st->codec->frame_size && sc->stts_count == 1) {
|
| ... | ... |
@@ -2258,7 +2258,7 @@ static int mov_write_header(AVFormatContext *s) |
| 2258 | 2258 |
if (!track->height) |
| 2259 | 2259 |
track->height = st->codec->height; |
| 2260 | 2260 |
|
| 2261 |
- av_set_pts_info(st, 64, 1, track->timescale); |
|
| 2261 |
+ avpriv_set_pts_info(st, 64, 1, track->timescale); |
|
| 2262 | 2262 |
} |
| 2263 | 2263 |
|
| 2264 | 2264 |
mov_write_mdat_tag(pb, mov); |
| ... | ... |
@@ -24,6 +24,7 @@ |
| 24 | 24 |
#include "libavutil/dict.h" |
| 25 | 25 |
#include "libavutil/mathematics.h" |
| 26 | 26 |
#include "avformat.h" |
| 27 |
+#include "internal.h" |
|
| 27 | 28 |
#include "id3v2.h" |
| 28 | 29 |
#include "id3v1.h" |
| 29 | 30 |
#include "libavcodec/mpegaudiodecheader.h" |
| ... | ... |
@@ -147,7 +148,7 @@ static int mp3_read_header(AVFormatContext *s, |
| 147 | 147 |
st->start_time = 0; |
| 148 | 148 |
|
| 149 | 149 |
// lcm of all mp3 sample rates |
| 150 |
- av_set_pts_info(st, 64, 1, 14112000); |
|
| 150 |
+ avpriv_set_pts_info(st, 64, 1, 14112000); |
|
| 151 | 151 |
|
| 152 | 152 |
off = avio_tell(s->pb); |
| 153 | 153 |
|
| ... | ... |
@@ -21,6 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
#include "libavcodec/get_bits.h" |
| 23 | 23 |
#include "avformat.h" |
| 24 |
+#include "internal.h" |
|
| 24 | 25 |
#include "apetag.h" |
| 25 | 26 |
#include "id3v1.h" |
| 26 | 27 |
#include "libavutil/dict.h" |
| ... | ... |
@@ -96,7 +97,7 @@ static int mpc_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 96 | 96 |
st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE); |
| 97 | 97 |
avio_read(s->pb, st->codec->extradata, 16); |
| 98 | 98 |
st->codec->sample_rate = mpc_rate[st->codec->extradata[2] & 3]; |
| 99 |
- av_set_pts_info(st, 32, MPC_FRAMESIZE, st->codec->sample_rate); |
|
| 99 |
+ avpriv_set_pts_info(st, 32, MPC_FRAMESIZE, st->codec->sample_rate); |
|
| 100 | 100 |
/* scan for seekpoints */ |
| 101 | 101 |
st->start_time = 0; |
| 102 | 102 |
st->duration = c->fcount; |
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include "libavcodec/get_bits.h" |
| 23 | 23 |
#include "libavcodec/unary.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
#include "avio_internal.h" |
| 26 | 27 |
|
| 27 | 28 |
/// Two-byte MPC tag |
| ... | ... |
@@ -235,7 +236,7 @@ static int mpc8_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 235 | 235 |
|
| 236 | 236 |
st->codec->channels = (st->codec->extradata[1] >> 4) + 1; |
| 237 | 237 |
st->codec->sample_rate = mpc8_rate[st->codec->extradata[0] >> 5]; |
| 238 |
- av_set_pts_info(st, 32, 1152 << (st->codec->extradata[1]&3)*2, st->codec->sample_rate); |
|
| 238 |
+ avpriv_set_pts_info(st, 32, 1152 << (st->codec->extradata[1]&3)*2, st->codec->sample_rate); |
|
| 239 | 239 |
st->duration = c->samples / (1152 << (st->codec->extradata[1]&3)*2); |
| 240 | 240 |
size -= avio_tell(pb) - pos; |
| 241 | 241 |
|
| ... | ... |
@@ -25,6 +25,7 @@ |
| 25 | 25 |
#include "libavutil/opt.h" |
| 26 | 26 |
#include "libavcodec/put_bits.h" |
| 27 | 27 |
#include "avformat.h" |
| 28 |
+#include "internal.h" |
|
| 28 | 29 |
#include "mpeg.h" |
| 29 | 30 |
|
| 30 | 31 |
#define MAX_PAYLOAD_SIZE 4096 |
| ... | ... |
@@ -336,7 +337,7 @@ static int mpeg_mux_init(AVFormatContext *ctx) |
| 336 | 336 |
goto fail; |
| 337 | 337 |
st->priv_data = stream; |
| 338 | 338 |
|
| 339 |
- av_set_pts_info(st, 64, 1, 90000); |
|
| 339 |
+ avpriv_set_pts_info(st, 64, 1, 90000); |
|
| 340 | 340 |
|
| 341 | 341 |
switch(st->codec->codec_type) {
|
| 342 | 342 |
case AVMEDIA_TYPE_AUDIO: |
| ... | ... |
@@ -577,7 +577,7 @@ static void mpegts_find_stream_type(AVStream *st, |
| 577 | 577 |
static int mpegts_set_stream_info(AVStream *st, PESContext *pes, |
| 578 | 578 |
uint32_t stream_type, uint32_t prog_reg_desc) |
| 579 | 579 |
{
|
| 580 |
- av_set_pts_info(st, 33, 1, 90000); |
|
| 580 |
+ avpriv_set_pts_info(st, 33, 1, 90000); |
|
| 581 | 581 |
st->priv_data = pes; |
| 582 | 582 |
st->codec->codec_type = AVMEDIA_TYPE_DATA; |
| 583 | 583 |
st->codec->codec_id = CODEC_ID_NONE; |
| ... | ... |
@@ -612,7 +612,7 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes, |
| 612 | 612 |
} |
| 613 | 613 |
|
| 614 | 614 |
sub_st->id = pes->pid; |
| 615 |
- av_set_pts_info(sub_st, 33, 1, 90000); |
|
| 615 |
+ avpriv_set_pts_info(sub_st, 33, 1, 90000); |
|
| 616 | 616 |
sub_st->priv_data = sub_pes; |
| 617 | 617 |
sub_st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 618 | 618 |
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 |
| 732 | 732 |
if (cts != AV_NOPTS_VALUE) |
| 733 | 733 |
pes->pts = cts; |
| 734 | 734 |
|
| 735 |
- av_set_pts_info(pes->st, sl->timestamp_len, 1, sl->timestamp_res); |
|
| 735 |
+ avpriv_set_pts_info(pes->st, sl->timestamp_len, 1, sl->timestamp_res); |
|
| 736 | 736 |
|
| 737 | 737 |
return (get_bits_count(&gb) + 7) >> 3; |
| 738 | 738 |
} |
| ... | ... |
@@ -1920,7 +1920,7 @@ static int mpegts_read_header(AVFormatContext *s, |
| 1920 | 1920 |
st = avformat_new_stream(s, NULL); |
| 1921 | 1921 |
if (!st) |
| 1922 | 1922 |
goto fail; |
| 1923 |
- av_set_pts_info(st, 60, 1, 27000000); |
|
| 1923 |
+ avpriv_set_pts_info(st, 60, 1, 27000000); |
|
| 1924 | 1924 |
st->codec->codec_type = AVMEDIA_TYPE_DATA; |
| 1925 | 1925 |
st->codec->codec_id = CODEC_ID_MPEG2TS; |
| 1926 | 1926 |
|
| ... | ... |
@@ -484,7 +484,7 @@ static int mpegts_write_header(AVFormatContext *s) |
| 484 | 484 |
/* assign pids to each stream */ |
| 485 | 485 |
for(i = 0;i < s->nb_streams; i++) {
|
| 486 | 486 |
st = s->streams[i]; |
| 487 |
- av_set_pts_info(st, 33, 1, 90000); |
|
| 487 |
+ avpriv_set_pts_info(st, 33, 1, 90000); |
|
| 488 | 488 |
ts_st = av_mallocz(sizeof(MpegTSWriteStream)); |
| 489 | 489 |
if (!ts_st) |
| 490 | 490 |
goto fail; |
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
|
| 21 | 21 |
#include "libavcodec/bytestream.h" |
| 22 | 22 |
#include "avformat.h" |
| 23 |
+#include "internal.h" |
|
| 23 | 24 |
|
| 24 | 25 |
#define HEADER_SIZE 24 |
| 25 | 26 |
|
| ... | ... |
@@ -84,7 +85,7 @@ static int msnwc_tcp_read_header(AVFormatContext *ctx, AVFormatParameters *ap) |
| 84 | 84 |
codec->codec_id = CODEC_ID_MIMIC; |
| 85 | 85 |
codec->codec_tag = MKTAG('M', 'L', '2', '0');
|
| 86 | 86 |
|
| 87 |
- av_set_pts_info(st, 32, 1, 1000); |
|
| 87 |
+ avpriv_set_pts_info(st, 32, 1, 1000); |
|
| 88 | 88 |
|
| 89 | 89 |
/* Some files start with "connected\r\n\r\n". |
| 90 | 90 |
* So skip until we find the first byte of struct size */ |
| ... | ... |
@@ -27,6 +27,7 @@ |
| 27 | 27 |
#include "libavutil/bswap.h" |
| 28 | 28 |
#include "libavutil/intreadwrite.h" |
| 29 | 29 |
#include "avformat.h" |
| 30 |
+#include "internal.h" |
|
| 30 | 31 |
|
| 31 | 32 |
#define MTV_ASUBCHUNK_DATA_SIZE 500 |
| 32 | 33 |
#define MTV_HEADER_SIZE 512 |
| ... | ... |
@@ -120,7 +121,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 120 | 120 |
if(!st) |
| 121 | 121 |
return AVERROR(ENOMEM); |
| 122 | 122 |
|
| 123 |
- av_set_pts_info(st, 64, 1, mtv->video_fps); |
|
| 123 |
+ avpriv_set_pts_info(st, 64, 1, mtv->video_fps); |
|
| 124 | 124 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 125 | 125 |
st->codec->codec_id = CODEC_ID_RAWVIDEO; |
| 126 | 126 |
st->codec->pix_fmt = PIX_FMT_RGB565; |
| ... | ... |
@@ -136,7 +137,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 136 | 136 |
if(!st) |
| 137 | 137 |
return AVERROR(ENOMEM); |
| 138 | 138 |
|
| 139 |
- av_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE); |
|
| 139 |
+ avpriv_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE); |
|
| 140 | 140 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 141 | 141 |
st->codec->codec_id = CODEC_ID_MP3; |
| 142 | 142 |
st->codec->bit_rate = mtv->audio_br; |
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 | 22 |
#include "avformat.h" |
| 23 |
+#include "internal.h" |
|
| 23 | 24 |
|
| 24 | 25 |
#define MVI_FRAC_BITS 10 |
| 25 | 26 |
|
| ... | ... |
@@ -76,14 +77,14 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 76 | 76 |
return AVERROR_INVALIDDATA; |
| 77 | 77 |
} |
| 78 | 78 |
|
| 79 |
- av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); |
|
| 79 |
+ avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate); |
|
| 80 | 80 |
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 81 | 81 |
ast->codec->codec_id = CODEC_ID_PCM_U8; |
| 82 | 82 |
ast->codec->channels = 1; |
| 83 | 83 |
ast->codec->bits_per_coded_sample = 8; |
| 84 | 84 |
ast->codec->bit_rate = ast->codec->sample_rate * 8; |
| 85 | 85 |
|
| 86 |
- av_set_pts_info(vst, 64, msecs_per_frame, 1000000); |
|
| 86 |
+ avpriv_set_pts_info(vst, 64, msecs_per_frame, 1000000); |
|
| 87 | 87 |
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 88 | 88 |
vst->codec->codec_id = CODEC_ID_MOTIONPIXELS; |
| 89 | 89 |
|
| ... | ... |
@@ -758,7 +758,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) |
| 758 | 758 |
if (st->duration == -1) |
| 759 | 759 |
st->duration = AV_NOPTS_VALUE; |
| 760 | 760 |
st->start_time = component->start_position; |
| 761 |
- av_set_pts_info(st, 64, material_track->edit_rate.num, material_track->edit_rate.den); |
|
| 761 |
+ avpriv_set_pts_info(st, 64, material_track->edit_rate.num, material_track->edit_rate.den); |
|
| 762 | 762 |
|
| 763 | 763 |
if (!(source_track->sequence = mxf_resolve_strong_ref(mxf, &source_track->sequence_ref, Sequence))) {
|
| 764 | 764 |
av_log(mxf->fc, AV_LOG_ERROR, "could not resolve source track sequence strong ref\n"); |
| ... | ... |
@@ -1438,7 +1438,7 @@ static int mxf_write_header(AVFormatContext *s) |
| 1438 | 1438 |
av_log(s, AV_LOG_ERROR, "unsupported video frame rate\n"); |
| 1439 | 1439 |
return -1; |
| 1440 | 1440 |
} |
| 1441 |
- av_set_pts_info(st, 64, mxf->time_base.num, mxf->time_base.den); |
|
| 1441 |
+ avpriv_set_pts_info(st, 64, mxf->time_base.num, mxf->time_base.den); |
|
| 1442 | 1442 |
if (s->oformat == &ff_mxf_d10_muxer) {
|
| 1443 | 1443 |
if (st->codec->bit_rate == 50000000) |
| 1444 | 1444 |
if (mxf->time_base.den == 25) sc->index = 3; |
| ... | ... |
@@ -1466,7 +1466,7 @@ static int mxf_write_header(AVFormatContext *s) |
| 1466 | 1466 |
av_log(s, AV_LOG_ERROR, "only 48khz is implemented\n"); |
| 1467 | 1467 |
return -1; |
| 1468 | 1468 |
} |
| 1469 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 1469 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 1470 | 1470 |
if (s->oformat == &ff_mxf_d10_muxer) {
|
| 1471 | 1471 |
if (st->index != 1) {
|
| 1472 | 1472 |
av_log(s, AV_LOG_ERROR, "MXF D-10 only support one audio track\n"); |
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include "libavutil/intreadwrite.h" |
| 23 | 23 |
#include "libavcodec/mjpeg.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
#include "avio.h" |
| 26 | 27 |
|
| 27 | 28 |
#define DEFAULT_PACKET_SIZE 1024 |
| ... | ... |
@@ -47,7 +48,7 @@ static int mxg_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 47 | 47 |
return AVERROR(ENOMEM); |
| 48 | 48 |
video_st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 49 | 49 |
video_st->codec->codec_id = CODEC_ID_MXPEG; |
| 50 |
- av_set_pts_info(video_st, 64, 1, 1000000); |
|
| 50 |
+ avpriv_set_pts_info(video_st, 64, 1, 1000000); |
|
| 51 | 51 |
|
| 52 | 52 |
audio_st = avformat_new_stream(s, NULL); |
| 53 | 53 |
if (!audio_st) |
| ... | ... |
@@ -58,7 +59,7 @@ static int mxg_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 58 | 58 |
audio_st->codec->sample_rate = 8000; |
| 59 | 59 |
audio_st->codec->bits_per_coded_sample = 8; |
| 60 | 60 |
audio_st->codec->block_align = 1; |
| 61 |
- av_set_pts_info(audio_st, 64, 1, 1000000); |
|
| 61 |
+ avpriv_set_pts_info(audio_st, 64, 1, 1000000); |
|
| 62 | 62 |
|
| 63 | 63 |
mxg->soi_ptr = mxg->buffer_ptr = mxg->buffer = 0; |
| 64 | 64 |
mxg->buffer_size = 0; |
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
|
| 23 | 23 |
#include "libavutil/intreadwrite.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
|
| 26 | 27 |
#define NC_VIDEO_FLAG 0x1A5 |
| 27 | 28 |
|
| ... | ... |
@@ -54,7 +55,7 @@ static int nc_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 54 | 54 |
st->codec->codec_id = CODEC_ID_MPEG4; |
| 55 | 55 |
st->need_parsing = AVSTREAM_PARSE_FULL; |
| 56 | 56 |
|
| 57 |
- av_set_pts_info(st, 64, 1, 100); |
|
| 57 |
+ avpriv_set_pts_info(st, 64, 1, 100); |
|
| 58 | 58 |
|
| 59 | 59 |
return 0; |
| 60 | 60 |
} |
| ... | ... |
@@ -21,6 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
#include "libavutil/mathematics.h" |
| 23 | 23 |
#include "avformat.h" |
| 24 |
+#include "internal.h" |
|
| 24 | 25 |
#include "riff.h" |
| 25 | 26 |
#include "libavutil/dict.h" |
| 26 | 27 |
|
| ... | ... |
@@ -457,7 +458,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) |
| 457 | 457 |
st->codec->height = vheight; |
| 458 | 458 |
st->codec->bits_per_coded_sample = 24; /* depth XXX */ |
| 459 | 459 |
|
| 460 |
- av_set_pts_info(st, 64, framerate.den, framerate.num); |
|
| 460 |
+ avpriv_set_pts_info(st, 64, framerate.den, framerate.num); |
|
| 461 | 461 |
st->start_time = 0; |
| 462 | 462 |
st->duration = av_rescale(nsv->duration, framerate.num, 1000*framerate.den); |
| 463 | 463 |
|
| ... | ... |
@@ -489,7 +490,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) |
| 489 | 489 |
st->need_parsing = AVSTREAM_PARSE_FULL; /* for PCM we will read a chunk later and put correct info */ |
| 490 | 490 |
|
| 491 | 491 |
/* set timebase to common denominator of ms and framerate */ |
| 492 |
- av_set_pts_info(st, 64, 1, framerate.num*1000); |
|
| 492 |
+ avpriv_set_pts_info(st, 64, 1, framerate.num*1000); |
|
| 493 | 493 |
st->start_time = 0; |
| 494 | 494 |
st->duration = (int64_t)nsv->duration * framerate.num; |
| 495 | 495 |
#endif |
| ... | ... |
@@ -374,7 +374,7 @@ static int decode_stream_header(NUTContext *nut){
|
| 374 | 374 |
return -1; |
| 375 | 375 |
} |
| 376 | 376 |
stc->time_base= &nut->time_base[stc->time_base_id]; |
| 377 |
- av_set_pts_info(s->streams[stream_id], 63, stc->time_base->num, stc->time_base->den); |
|
| 377 |
+ avpriv_set_pts_info(s->streams[stream_id], 63, stc->time_base->num, stc->time_base->den); |
|
| 378 | 378 |
return 0; |
| 379 | 379 |
} |
| 380 | 380 |
|
| ... | ... |
@@ -603,7 +603,7 @@ static int nut_write_header(AVFormatContext *s){
|
| 603 | 603 |
AVRational time_base; |
| 604 | 604 |
ff_parse_specific_params(st->codec, &time_base.den, &ssize, &time_base.num); |
| 605 | 605 |
|
| 606 |
- av_set_pts_info(st, 64, time_base.num, time_base.den); |
|
| 606 |
+ avpriv_set_pts_info(st, 64, time_base.num, time_base.den); |
|
| 607 | 607 |
|
| 608 | 608 |
for(j=0; j<nut->time_base_count; j++){
|
| 609 | 609 |
if(!memcmp(&time_base, &nut->time_base[j], sizeof(AVRational))){
|
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include "libavutil/intreadwrite.h" |
| 23 | 23 |
#include "libavutil/intfloat_readwrite.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
#include "riff.h" |
| 26 | 27 |
|
| 27 | 28 |
typedef struct {
|
| ... | ... |
@@ -163,7 +164,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
|
| 163 | 163 |
vst->codec->bits_per_coded_sample = 10; |
| 164 | 164 |
vst->sample_aspect_ratio = av_d2q(aspect * height / width, 10000); |
| 165 | 165 |
vst->r_frame_rate = av_d2q(fps, 60000); |
| 166 |
- av_set_pts_info(vst, 32, 1, 1000); |
|
| 166 |
+ avpriv_set_pts_info(vst, 32, 1, 1000); |
|
| 167 | 167 |
} else |
| 168 | 168 |
ctx->v_id = -1; |
| 169 | 169 |
|
| ... | ... |
@@ -179,7 +180,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
|
| 179 | 179 |
ast->codec->bit_rate = 2 * 2 * 44100 * 8; |
| 180 | 180 |
ast->codec->block_align = 2 * 2; |
| 181 | 181 |
ast->codec->bits_per_coded_sample = 16; |
| 182 |
- av_set_pts_info(ast, 32, 1, 1000); |
|
| 182 |
+ avpriv_set_pts_info(ast, 32, 1, 1000); |
|
| 183 | 183 |
} else |
| 184 | 184 |
ctx->a_id = -1; |
| 185 | 185 |
|
| ... | ... |
@@ -323,9 +323,9 @@ static int ogg_write_header(AVFormatContext *s) |
| 323 | 323 |
unsigned serial_num = i; |
| 324 | 324 |
|
| 325 | 325 |
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) |
| 326 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 326 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 327 | 327 |
else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) |
| 328 |
- av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); |
|
| 328 |
+ avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); |
|
| 329 | 329 |
if (st->codec->codec_id != CODEC_ID_VORBIS && |
| 330 | 330 |
st->codec->codec_id != CODEC_ID_THEORA && |
| 331 | 331 |
st->codec->codec_id != CODEC_ID_SPEEX && |
| ... | ... |
@@ -23,6 +23,7 @@ |
| 23 | 23 |
|
| 24 | 24 |
#include "libavutil/intreadwrite.h" |
| 25 | 25 |
#include "avformat.h" |
| 26 |
+#include "internal.h" |
|
| 26 | 27 |
#include "oggdec.h" |
| 27 | 28 |
|
| 28 | 29 |
struct oggcelt_private {
|
| ... | ... |
@@ -71,7 +72,7 @@ static int celt_header(AVFormatContext *s, int idx) |
| 71 | 71 |
st->codec->extradata = extradata; |
| 72 | 72 |
st->codec->extradata_size = 2 * sizeof(uint32_t); |
| 73 | 73 |
if (sample_rate) |
| 74 |
- av_set_pts_info(st, 64, 1, sample_rate); |
|
| 74 |
+ avpriv_set_pts_info(st, 64, 1, sample_rate); |
|
| 75 | 75 |
priv->extra_headers_left = 1 + extra_headers; |
| 76 | 76 |
os->private = priv; |
| 77 | 77 |
AV_WL32(extradata + 0, overlap); |
| ... | ... |
@@ -21,6 +21,7 @@ |
| 21 | 21 |
#include "libavcodec/get_bits.h" |
| 22 | 22 |
#include "libavcodec/dirac.h" |
| 23 | 23 |
#include "avformat.h" |
| 24 |
+#include "internal.h" |
|
| 24 | 25 |
#include "oggdec.h" |
| 25 | 26 |
|
| 26 | 27 |
static int dirac_header(AVFormatContext *s, int idx) |
| ... | ... |
@@ -42,7 +43,7 @@ static int dirac_header(AVFormatContext *s, int idx) |
| 42 | 42 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 43 | 43 |
st->codec->codec_id = CODEC_ID_DIRAC; |
| 44 | 44 |
// dirac in ogg always stores timestamps as though the video were interlaced |
| 45 |
- av_set_pts_info(st, 64, st->codec->time_base.num, 2*st->codec->time_base.den); |
|
| 45 |
+ avpriv_set_pts_info(st, 64, st->codec->time_base.num, 2*st->codec->time_base.den); |
|
| 46 | 46 |
return 1; |
| 47 | 47 |
} |
| 48 | 48 |
|
| ... | ... |
@@ -79,7 +80,7 @@ static int old_dirac_header(AVFormatContext *s, int idx) |
| 79 | 79 |
|
| 80 | 80 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 81 | 81 |
st->codec->codec_id = CODEC_ID_DIRAC; |
| 82 |
- av_set_pts_info(st, 64, AV_RB32(buf+12), AV_RB32(buf+8)); |
|
| 82 |
+ avpriv_set_pts_info(st, 64, AV_RB32(buf+12), AV_RB32(buf+8)); |
|
| 83 | 83 |
return 1; |
| 84 | 84 |
} |
| 85 | 85 |
|
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include "libavcodec/get_bits.h" |
| 23 | 23 |
#include "libavcodec/flac.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
#include "oggdec.h" |
| 26 | 27 |
|
| 27 | 28 |
#define OGG_FLAC_METADATA_TYPE_STREAMINFO 0x7F |
| ... | ... |
@@ -65,7 +66,7 @@ flac_header (AVFormatContext * s, int idx) |
| 65 | 65 |
memcpy(st->codec->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE); |
| 66 | 66 |
st->codec->extradata_size = FLAC_STREAMINFO_SIZE; |
| 67 | 67 |
|
| 68 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 68 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 69 | 69 |
} else if (mdt == FLAC_METADATA_TYPE_VORBIS_COMMENT) {
|
| 70 | 70 |
ff_vorbis_comment (s, &st->metadata, os->buf + os->pstart + 4, os->psize - 4); |
| 71 | 71 |
} |
| ... | ... |
@@ -27,6 +27,7 @@ |
| 27 | 27 |
#include "libavcodec/get_bits.h" |
| 28 | 28 |
#include "libavcodec/bytestream.h" |
| 29 | 29 |
#include "avformat.h" |
| 30 |
+#include "internal.h" |
|
| 30 | 31 |
#include "oggdec.h" |
| 31 | 32 |
#include "riff.h" |
| 32 | 33 |
|
| ... | ... |
@@ -81,13 +82,13 @@ ogm_header(AVFormatContext *s, int idx) |
| 81 | 81 |
st->codec->height = bytestream_get_le32(&p); |
| 82 | 82 |
st->codec->time_base.den = spu * 10000000; |
| 83 | 83 |
st->codec->time_base.num = time_unit; |
| 84 |
- av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); |
|
| 84 |
+ avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); |
|
| 85 | 85 |
} else {
|
| 86 | 86 |
st->codec->channels = bytestream_get_le16(&p); |
| 87 | 87 |
p += 2; /* block_align */ |
| 88 | 88 |
st->codec->bit_rate = bytestream_get_le32(&p) * 8; |
| 89 | 89 |
st->codec->sample_rate = spu * 10000000 / time_unit; |
| 90 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 90 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 91 | 91 |
} |
| 92 | 92 |
} else if (*p == 3) {
|
| 93 | 93 |
if (os->psize > 8) |
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
|
| 21 | 21 |
#include "libavcodec/bytestream.h" |
| 22 | 22 |
#include "avformat.h" |
| 23 |
+#include "internal.h" |
|
| 23 | 24 |
#include "oggdec.h" |
| 24 | 25 |
|
| 25 | 26 |
static int skeleton_header(AVFormatContext *s, int idx) |
| ... | ... |
@@ -62,7 +63,7 @@ static int skeleton_header(AVFormatContext *s, int idx) |
| 62 | 62 |
if (start_den) {
|
| 63 | 63 |
int base_den; |
| 64 | 64 |
av_reduce(&start_time, &base_den, start_num, start_den, INT_MAX); |
| 65 |
- av_set_pts_info(st, 64, 1, base_den); |
|
| 65 |
+ avpriv_set_pts_info(st, 64, 1, base_den); |
|
| 66 | 66 |
os->lastpts = |
| 67 | 67 |
st->start_time = start_time; |
| 68 | 68 |
} |
| ... | ... |
@@ -28,6 +28,7 @@ |
| 28 | 28 |
#include "libavcodec/get_bits.h" |
| 29 | 29 |
#include "libavcodec/bytestream.h" |
| 30 | 30 |
#include "avformat.h" |
| 31 |
+#include "internal.h" |
|
| 31 | 32 |
#include "oggdec.h" |
| 32 | 33 |
|
| 33 | 34 |
struct speex_params {
|
| ... | ... |
@@ -69,7 +70,7 @@ static int speex_header(AVFormatContext *s, int idx) {
|
| 69 | 69 |
+ FF_INPUT_BUFFER_PADDING_SIZE); |
| 70 | 70 |
memcpy(st->codec->extradata, p, st->codec->extradata_size); |
| 71 | 71 |
|
| 72 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 72 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 73 | 73 |
} else |
| 74 | 74 |
ff_vorbis_comment(s, &st->metadata, p, os->psize); |
| 75 | 75 |
|
| ... | ... |
@@ -26,6 +26,7 @@ |
| 26 | 26 |
#include "libavutil/bswap.h" |
| 27 | 27 |
#include "libavcodec/get_bits.h" |
| 28 | 28 |
#include "avformat.h" |
| 29 |
+#include "internal.h" |
|
| 29 | 30 |
#include "oggdec.h" |
| 30 | 31 |
|
| 31 | 32 |
struct theora_params {
|
| ... | ... |
@@ -91,7 +92,7 @@ theora_header (AVFormatContext * s, int idx) |
| 91 | 91 |
st->codec->time_base.num = 1; |
| 92 | 92 |
st->codec->time_base.den = 25; |
| 93 | 93 |
} |
| 94 |
- av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); |
|
| 94 |
+ avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den); |
|
| 95 | 95 |
|
| 96 | 96 |
st->sample_aspect_ratio.num = get_bits_long(&gb, 24); |
| 97 | 97 |
st->sample_aspect_ratio.den = get_bits_long(&gb, 24); |
| ... | ... |
@@ -254,7 +254,7 @@ vorbis_header (AVFormatContext * s, int idx) |
| 254 | 254 |
|
| 255 | 255 |
if (srate > 0) {
|
| 256 | 256 |
st->codec->sample_rate = srate; |
| 257 |
- av_set_pts_info(st, 64, 1, srate); |
|
| 257 |
+ avpriv_set_pts_info(st, 64, 1, srate); |
|
| 258 | 258 |
} |
| 259 | 259 |
} else if (os->buf[os->pstart] == 3) {
|
| 260 | 260 |
if (os->psize > 8 && |
| ... | ... |
@@ -41,6 +41,7 @@ |
| 41 | 41 |
*/ |
| 42 | 42 |
|
| 43 | 43 |
#include "avformat.h" |
| 44 |
+#include "internal.h" |
|
| 44 | 45 |
#include "libavutil/intreadwrite.h" |
| 45 | 46 |
#include "libavutil/des.h" |
| 46 | 47 |
#include "pcm.h" |
| ... | ... |
@@ -343,14 +344,14 @@ static int oma_read_header(AVFormatContext *s, |
| 343 | 343 |
AV_WL16(&edata[10], 1); // always 1 |
| 344 | 344 |
// AV_WL16(&edata[12], 0); // always 0 |
| 345 | 345 |
|
| 346 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 346 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 347 | 347 |
break; |
| 348 | 348 |
case OMA_CODECID_ATRAC3P: |
| 349 | 349 |
st->codec->channels = (codec_params >> 10) & 7; |
| 350 | 350 |
framesize = ((codec_params & 0x3FF) * 8) + 8; |
| 351 | 351 |
st->codec->sample_rate = srate_tab[(codec_params >> 13) & 7]*100; |
| 352 | 352 |
st->codec->bit_rate = st->codec->sample_rate * framesize * 8 / 1024; |
| 353 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 353 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 354 | 354 |
av_log(s, AV_LOG_ERROR, "Unsupported codec ATRAC3+!\n"); |
| 355 | 355 |
break; |
| 356 | 356 |
case OMA_CODECID_MP3: |
| ... | ... |
@@ -31,6 +31,7 @@ |
| 31 | 31 |
|
| 32 | 32 |
#include "libavutil/intreadwrite.h" |
| 33 | 33 |
#include "avformat.h" |
| 34 |
+#include "internal.h" |
|
| 34 | 35 |
|
| 35 | 36 |
#define RIFF_TAG MKTAG('R', 'I', 'F', 'F')
|
| 36 | 37 |
#define CDXA_TAG MKTAG('C', 'D', 'X', 'A')
|
| ... | ... |
@@ -165,7 +166,7 @@ static int str_read_packet(AVFormatContext *s, |
| 165 | 165 |
st = avformat_new_stream(s, NULL); |
| 166 | 166 |
if (!st) |
| 167 | 167 |
return AVERROR(ENOMEM); |
| 168 |
- av_set_pts_info(st, 64, 1, 15); |
|
| 168 |
+ avpriv_set_pts_info(st, 64, 1, 15); |
|
| 169 | 169 |
|
| 170 | 170 |
str->channels[channel].video_stream_index = st->index; |
| 171 | 171 |
|
| ... | ... |
@@ -224,7 +225,7 @@ static int str_read_packet(AVFormatContext *s, |
| 224 | 224 |
// st->codec->bit_rate = 0; //FIXME; |
| 225 | 225 |
st->codec->block_align = 128; |
| 226 | 226 |
|
| 227 |
- av_set_pts_info(st, 64, 128, st->codec->sample_rate); |
|
| 227 |
+ avpriv_set_pts_info(st, 64, 128, st->codec->sample_rate); |
|
| 228 | 228 |
} |
| 229 | 229 |
pkt = ret_pkt; |
| 230 | 230 |
if (av_new_packet(pkt, 2304)) |
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 | 22 |
#include "avformat.h" |
| 23 |
+#include "internal.h" |
|
| 23 | 24 |
#include "mpeg.h" |
| 24 | 25 |
|
| 25 | 26 |
#define PVA_MAX_PAYLOAD_LENGTH 0x17f8 |
| ... | ... |
@@ -48,7 +49,7 @@ static int pva_read_header(AVFormatContext *s, AVFormatParameters *ap) {
|
| 48 | 48 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 49 | 49 |
st->codec->codec_id = CODEC_ID_MPEG2VIDEO; |
| 50 | 50 |
st->need_parsing = AVSTREAM_PARSE_FULL; |
| 51 |
- av_set_pts_info(st, 32, 1, 90000); |
|
| 51 |
+ avpriv_set_pts_info(st, 32, 1, 90000); |
|
| 52 | 52 |
av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME); |
| 53 | 53 |
|
| 54 | 54 |
if (!(st = avformat_new_stream(s, NULL))) |
| ... | ... |
@@ -56,7 +57,7 @@ static int pva_read_header(AVFormatContext *s, AVFormatParameters *ap) {
|
| 56 | 56 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 57 | 57 |
st->codec->codec_id = CODEC_ID_MP2; |
| 58 | 58 |
st->need_parsing = AVSTREAM_PARSE_FULL; |
| 59 |
- av_set_pts_info(st, 33, 1, 90000); |
|
| 59 |
+ avpriv_set_pts_info(st, 33, 1, 90000); |
|
| 60 | 60 |
av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME); |
| 61 | 61 |
|
| 62 | 62 |
/* the parameters will be extracted from the compressed bitstream */ |
| ... | ... |
@@ -25,6 +25,7 @@ |
| 25 | 25 |
#include "libavutil/dict.h" |
| 26 | 26 |
#include "libavutil/mathematics.h" |
| 27 | 27 |
#include "avformat.h" |
| 28 |
+#include "internal.h" |
|
| 28 | 29 |
|
| 29 | 30 |
typedef struct {
|
| 30 | 31 |
unsigned video_offsets_count; |
| ... | ... |
@@ -70,7 +71,7 @@ static int r3d_read_red1(AVFormatContext *s) |
| 70 | 70 |
av_dlog(s, "unknown1 %d\n", tmp); |
| 71 | 71 |
|
| 72 | 72 |
tmp = avio_rb32(s->pb); |
| 73 |
- av_set_pts_info(st, 32, 1, tmp); |
|
| 73 |
+ avpriv_set_pts_info(st, 32, 1, tmp); |
|
| 74 | 74 |
|
| 75 | 75 |
tmp = avio_rb32(s->pb); // filenum |
| 76 | 76 |
av_dlog(s, "filenum %d\n", tmp); |
| ... | ... |
@@ -95,7 +96,7 @@ static int r3d_read_red1(AVFormatContext *s) |
| 95 | 95 |
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 96 | 96 |
ast->codec->codec_id = CODEC_ID_PCM_S32BE; |
| 97 | 97 |
ast->codec->channels = tmp; |
| 98 |
- av_set_pts_info(ast, 32, 1, st->time_base.den); |
|
| 98 |
+ avpriv_set_pts_info(ast, 32, 1, st->time_base.den); |
|
| 99 | 99 |
} |
| 100 | 100 |
|
| 101 | 101 |
avio_read(s->pb, filename, 257); |
| ... | ... |
@@ -21,6 +21,7 @@ |
| 21 | 21 |
*/ |
| 22 | 22 |
|
| 23 | 23 |
#include "avformat.h" |
| 24 |
+#include "internal.h" |
|
| 24 | 25 |
#include "avio_internal.h" |
| 25 | 26 |
#include "rawdec.h" |
| 26 | 27 |
#include "libavutil/opt.h" |
| ... | ... |
@@ -62,7 +63,7 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 62 | 62 |
st->codec->bits_per_coded_sample = av_get_bits_per_sample(st->codec->codec_id); |
| 63 | 63 |
assert(st->codec->bits_per_coded_sample > 0); |
| 64 | 64 |
st->codec->block_align = st->codec->bits_per_coded_sample*st->codec->channels/8; |
| 65 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 65 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 66 | 66 |
break; |
| 67 | 67 |
} |
| 68 | 68 |
case AVMEDIA_TYPE_VIDEO: {
|
| ... | ... |
@@ -84,7 +85,7 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 84 | 84 |
av_log(s, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s1->framerate); |
| 85 | 85 |
goto fail; |
| 86 | 86 |
} |
| 87 |
- av_set_pts_info(st, 64, framerate.den, framerate.num); |
|
| 87 |
+ avpriv_set_pts_info(st, 64, framerate.den, framerate.num); |
|
| 88 | 88 |
st->codec->width = width; |
| 89 | 89 |
st->codec->height = height; |
| 90 | 90 |
st->codec->pix_fmt = pix_fmt; |
| ... | ... |
@@ -159,7 +160,7 @@ int ff_raw_video_read_header(AVFormatContext *s, |
| 159 | 159 |
} |
| 160 | 160 |
|
| 161 | 161 |
st->codec->time_base = (AVRational){framerate.den, framerate.num};
|
| 162 |
- av_set_pts_info(st, 64, 1, 1200000); |
|
| 162 |
+ avpriv_set_pts_info(st, 64, 1, 1200000); |
|
| 163 | 163 |
|
| 164 | 164 |
fail: |
| 165 | 165 |
return ret; |
| ... | ... |
@@ -35,6 +35,7 @@ |
| 35 | 35 |
#include "libavutil/intreadwrite.h" |
| 36 | 36 |
#include "libavutil/mathematics.h" |
| 37 | 37 |
#include "avformat.h" |
| 38 |
+#include "internal.h" |
|
| 38 | 39 |
|
| 39 | 40 |
#define EXTRADATA1_SIZE (6 + 256 * 3) ///< video base, clr, palette |
| 40 | 41 |
|
| ... | ... |
@@ -153,10 +154,10 @@ static av_cold int rl2_read_header(AVFormatContext *s, |
| 153 | 153 |
st->codec->bits_per_coded_sample; |
| 154 | 154 |
st->codec->block_align = st->codec->channels * |
| 155 | 155 |
st->codec->bits_per_coded_sample / 8; |
| 156 |
- av_set_pts_info(st,32,1,rate); |
|
| 156 |
+ avpriv_set_pts_info(st,32,1,rate); |
|
| 157 | 157 |
} |
| 158 | 158 |
|
| 159 |
- av_set_pts_info(s->streams[0], 32, pts_num, pts_den); |
|
| 159 |
+ avpriv_set_pts_info(s->streams[0], 32, pts_num, pts_den); |
|
| 160 | 160 |
|
| 161 | 161 |
chunk_size = av_malloc(frame_count * sizeof(uint32_t)); |
| 162 | 162 |
audio_size = av_malloc(frame_count * sizeof(uint32_t)); |
| ... | ... |
@@ -23,6 +23,7 @@ |
| 23 | 23 |
#include "libavutil/intreadwrite.h" |
| 24 | 24 |
#include "libavutil/dict.h" |
| 25 | 25 |
#include "avformat.h" |
| 26 |
+#include "internal.h" |
|
| 26 | 27 |
#include "riff.h" |
| 27 | 28 |
#include "rm.h" |
| 28 | 29 |
|
| ... | ... |
@@ -301,7 +302,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, |
| 301 | 301 |
int64_t codec_pos; |
| 302 | 302 |
int ret; |
| 303 | 303 |
|
| 304 |
- av_set_pts_info(st, 64, 1, 1000); |
|
| 304 |
+ avpriv_set_pts_info(st, 64, 1, 1000); |
|
| 305 | 305 |
codec_pos = avio_tell(pb); |
| 306 | 306 |
v = avio_rb32(pb); |
| 307 | 307 |
if (v == MKTAG(0xfd, 'a', 'r', '.')) {
|
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include "libavutil/avstring.h" |
| 23 | 23 |
#include "libavutil/dict.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
#include <stdlib.h> |
| 26 | 27 |
|
| 27 | 28 |
#define RPL_SIGNATURE "ARMovie\x0A" |
| ... | ... |
@@ -149,7 +150,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 149 | 149 |
vst->codec->bits_per_coded_sample = read_line_and_int(pb, &error); // video bits per sample |
| 150 | 150 |
error |= read_line(pb, line, sizeof(line)); // video frames per second |
| 151 | 151 |
fps = read_fps(line, &error); |
| 152 |
- av_set_pts_info(vst, 32, fps.den, fps.num); |
|
| 152 |
+ avpriv_set_pts_info(vst, 32, fps.den, fps.num); |
|
| 153 | 153 |
|
| 154 | 154 |
// Figure out the video codec |
| 155 | 155 |
switch (vst->codec->codec_tag) {
|
| ... | ... |
@@ -226,7 +227,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 226 | 226 |
"RPL audio format %i not supported yet!\n", |
| 227 | 227 |
audio_format); |
| 228 | 228 |
} |
| 229 |
- av_set_pts_info(ast, 32, 1, ast->codec->bit_rate); |
|
| 229 |
+ avpriv_set_pts_info(ast, 32, 1, ast->codec->bit_rate); |
|
| 230 | 230 |
} else {
|
| 231 | 231 |
for (i = 0; i < 3; i++) |
| 232 | 232 |
error |= read_line(pb, line, sizeof(line)); |
| ... | ... |
@@ -33,6 +33,7 @@ |
| 33 | 33 |
#include "rtsp.h" |
| 34 | 34 |
#include "asf.h" |
| 35 | 35 |
#include "avio_internal.h" |
| 36 |
+#include "internal.h" |
|
| 36 | 37 |
|
| 37 | 38 |
/** |
| 38 | 39 |
* 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, |
| 141 | 141 |
*rt->asf_ctx->streams[i]->codec; |
| 142 | 142 |
rt->asf_ctx->streams[i]->codec->extradata_size = 0; |
| 143 | 143 |
rt->asf_ctx->streams[i]->codec->extradata = NULL; |
| 144 |
- av_set_pts_info(s->streams[stream_index], 32, 1, 1000); |
|
| 144 |
+ avpriv_set_pts_info(s->streams[stream_index], 32, 1, 1000); |
|
| 145 | 145 |
} |
| 146 | 146 |
} |
| 147 | 147 |
} |
| ... | ... |
@@ -26,6 +26,7 @@ |
| 26 | 26 |
*/ |
| 27 | 27 |
|
| 28 | 28 |
#include "avformat.h" |
| 29 |
+#include "internal.h" |
|
| 29 | 30 |
#include "avio_internal.h" |
| 30 | 31 |
#include "rtp.h" |
| 31 | 32 |
#include "rtpdec.h" |
| ... | ... |
@@ -110,7 +111,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, |
| 110 | 110 |
(st->codec->codec_type == AVMEDIA_TYPE_AUDIO && |
| 111 | 111 |
tag != MKTAG('s','o','u','n')))
|
| 112 | 112 |
return AVERROR_INVALIDDATA; |
| 113 |
- av_set_pts_info(st, 32, 1, avio_rb32(&pb)); |
|
| 113 |
+ avpriv_set_pts_info(st, 32, 1, avio_rb32(&pb)); |
|
| 114 | 114 |
|
| 115 | 115 |
if (pos + data_len > len) |
| 116 | 116 |
return AVERROR_INVALIDDATA; |
| ... | ... |
@@ -130,7 +130,7 @@ static int rtp_write_header(AVFormatContext *s1) |
| 130 | 130 |
} |
| 131 | 131 |
} |
| 132 | 132 |
|
| 133 |
- av_set_pts_info(st, 32, 1, 90000); |
|
| 133 |
+ avpriv_set_pts_info(st, 32, 1, 90000); |
|
| 134 | 134 |
switch(st->codec->codec_id) {
|
| 135 | 135 |
case CODEC_ID_MP2: |
| 136 | 136 |
case CODEC_ID_MP3: |
| ... | ... |
@@ -166,7 +166,7 @@ static int rtp_write_header(AVFormatContext *s1) |
| 166 | 166 |
case CODEC_ID_ADPCM_G722: |
| 167 | 167 |
/* Due to a historical error, the clock rate for G722 in RTP is |
| 168 | 168 |
* 8000, even if the sample rate is 16000. See RFC 3551. */ |
| 169 |
- av_set_pts_info(st, 32, 1, 8000); |
|
| 169 |
+ avpriv_set_pts_info(st, 32, 1, 8000); |
|
| 170 | 170 |
break; |
| 171 | 171 |
case CODEC_ID_AMR_NB: |
| 172 | 172 |
case CODEC_ID_AMR_WB: |
| ... | ... |
@@ -190,7 +190,7 @@ static int rtp_write_header(AVFormatContext *s1) |
| 190 | 190 |
default: |
| 191 | 191 |
defaultcase: |
| 192 | 192 |
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
|
| 193 |
- av_set_pts_info(st, 32, 1, st->codec->sample_rate); |
|
| 193 |
+ avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate); |
|
| 194 | 194 |
} |
| 195 | 195 |
s->buf_ptr = s->buf; |
| 196 | 196 |
break; |
| ... | ... |
@@ -228,7 +228,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s, |
| 228 | 228 |
codec->channels = RTSP_DEFAULT_NB_AUDIO_CHANNELS; |
| 229 | 229 |
if (i > 0) {
|
| 230 | 230 |
codec->sample_rate = i; |
| 231 |
- av_set_pts_info(st, 32, 1, codec->sample_rate); |
|
| 231 |
+ avpriv_set_pts_info(st, 32, 1, codec->sample_rate); |
|
| 232 | 232 |
get_word_sep(buf, sizeof(buf), "/", &p); |
| 233 | 233 |
i = atoi(buf); |
| 234 | 234 |
if (i > 0) |
| ... | ... |
@@ -246,7 +246,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s, |
| 246 | 246 |
case AVMEDIA_TYPE_VIDEO: |
| 247 | 247 |
av_log(s, AV_LOG_DEBUG, "video codec set to: %s\n", c_name); |
| 248 | 248 |
if (i > 0) |
| 249 |
- av_set_pts_info(st, 32, 1, i); |
|
| 249 |
+ avpriv_set_pts_info(st, 32, 1, i); |
|
| 250 | 250 |
break; |
| 251 | 251 |
default: |
| 252 | 252 |
break; |
| ... | ... |
@@ -385,7 +385,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, |
| 385 | 385 |
ff_rtp_get_codec_info(st->codec, rtsp_st->sdp_payload_type); |
| 386 | 386 |
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && |
| 387 | 387 |
st->codec->sample_rate > 0) |
| 388 |
- av_set_pts_info(st, 32, 1, st->codec->sample_rate); |
|
| 388 |
+ avpriv_set_pts_info(st, 32, 1, st->codec->sample_rate); |
|
| 389 | 389 |
/* Even static payload types may need a custom depacketizer */ |
| 390 | 390 |
handler = ff_rtp_handler_find_by_id( |
| 391 | 391 |
rtsp_st->sdp_payload_type, st->codec->codec_type); |
| ... | ... |
@@ -29,6 +29,7 @@ |
| 29 | 29 |
|
| 30 | 30 |
#include "libavutil/intreadwrite.h" |
| 31 | 31 |
#include "avformat.h" |
| 32 |
+#include "internal.h" |
|
| 32 | 33 |
|
| 33 | 34 |
#define FILM_TAG MKBETAG('F', 'I', 'L', 'M')
|
| 34 | 35 |
#define FDSC_TAG MKBETAG('F', 'D', 'S', 'C')
|
| ... | ... |
@@ -197,7 +198,7 @@ static int film_read_header(AVFormatContext *s, |
| 197 | 197 |
return AVERROR(ENOMEM); |
| 198 | 198 |
|
| 199 | 199 |
for(i=0; i<s->nb_streams; i++) |
| 200 |
- av_set_pts_info(s->streams[i], 33, 1, film->base_clock); |
|
| 200 |
+ avpriv_set_pts_info(s->streams[i], 33, 1, film->base_clock); |
|
| 201 | 201 |
|
| 202 | 202 |
audio_frame_counter = 0; |
| 203 | 203 |
for (i = 0; i < film->sample_count; i++) {
|
| ... | ... |
@@ -29,6 +29,7 @@ |
| 29 | 29 |
|
| 30 | 30 |
#include "libavutil/intreadwrite.h" |
| 31 | 31 |
#include "avformat.h" |
| 32 |
+#include "internal.h" |
|
| 32 | 33 |
|
| 33 | 34 |
#define VMD_HEADER_SIZE 0x0330 |
| 34 | 35 |
#define BYTES_PER_FRAME_RECORD 16 |
| ... | ... |
@@ -107,7 +108,7 @@ static int vmd_read_header(AVFormatContext *s, |
| 107 | 107 |
vst = avformat_new_stream(s, NULL); |
| 108 | 108 |
if (!vst) |
| 109 | 109 |
return AVERROR(ENOMEM); |
| 110 |
- av_set_pts_info(vst, 33, 1, 10); |
|
| 110 |
+ avpriv_set_pts_info(vst, 33, 1, 10); |
|
| 111 | 111 |
vmd->video_stream_index = vst->index; |
| 112 | 112 |
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 113 | 113 |
vst->codec->codec_id = vmd->is_indeo3 ? CODEC_ID_INDEO3 : CODEC_ID_VMDVIDEO; |
| ... | ... |
@@ -148,8 +149,8 @@ static int vmd_read_header(AVFormatContext *s, |
| 148 | 148 |
num = st->codec->block_align; |
| 149 | 149 |
den = st->codec->sample_rate * st->codec->channels; |
| 150 | 150 |
av_reduce(&den, &num, den, num, (1UL<<31)-1); |
| 151 |
- av_set_pts_info(vst, 33, num, den); |
|
| 152 |
- av_set_pts_info(st, 33, num, den); |
|
| 151 |
+ avpriv_set_pts_info(vst, 33, num, den); |
|
| 152 |
+ avpriv_set_pts_info(st, 33, num, den); |
|
| 153 | 153 |
} |
| 154 | 154 |
|
| 155 | 155 |
toc_offset = AV_RL32(&vmd->vmd_header[812]); |
| ... | ... |
@@ -21,6 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
#include "libavutil/intreadwrite.h" |
| 23 | 23 |
#include "avformat.h" |
| 24 |
+#include "internal.h" |
|
| 24 | 25 |
|
| 25 | 26 |
enum SIFFTags{
|
| 26 | 27 |
TAG_SIFF = MKTAG('S', 'I', 'F', 'F'),
|
| ... | ... |
@@ -80,7 +81,7 @@ static int create_audio_stream(AVFormatContext *s, SIFFContext *c) |
| 80 | 80 |
ast->codec->bits_per_coded_sample = c->bits; |
| 81 | 81 |
ast->codec->sample_rate = c->rate; |
| 82 | 82 |
ast->codec->frame_size = c->block_align; |
| 83 |
- av_set_pts_info(ast, 16, 1, c->rate); |
|
| 83 |
+ avpriv_set_pts_info(ast, 16, 1, c->rate); |
|
| 84 | 84 |
return 0; |
| 85 | 85 |
} |
| 86 | 86 |
|
| ... | ... |
@@ -124,7 +125,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, AVIOContext *pb) |
| 124 | 124 |
st->codec->width = width; |
| 125 | 125 |
st->codec->height = height; |
| 126 | 126 |
st->codec->pix_fmt = PIX_FMT_PAL8; |
| 127 |
- av_set_pts_info(st, 16, 1, 12); |
|
| 127 |
+ avpriv_set_pts_info(st, 16, 1, 12); |
|
| 128 | 128 |
|
| 129 | 129 |
c->cur_frame = 0; |
| 130 | 130 |
c->has_video = 1; |
| ... | ... |
@@ -26,6 +26,7 @@ |
| 26 | 26 |
#include "libavutil/bswap.h" |
| 27 | 27 |
#include "libavutil/intreadwrite.h" |
| 28 | 28 |
#include "avformat.h" |
| 29 |
+#include "internal.h" |
|
| 29 | 30 |
|
| 30 | 31 |
#define SMACKER_PAL 0x01 |
| 31 | 32 |
#define SMACKER_FLAG_RING_FRAME 0x01 |
| ... | ... |
@@ -171,7 +172,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 171 | 171 |
smk->pts_inc *= 100; |
| 172 | 172 |
tbase = 100000; |
| 173 | 173 |
av_reduce(&tbase, &smk->pts_inc, tbase, smk->pts_inc, (1UL<<31)-1); |
| 174 |
- av_set_pts_info(st, 33, smk->pts_inc, tbase); |
|
| 174 |
+ avpriv_set_pts_info(st, 33, smk->pts_inc, tbase); |
|
| 175 | 175 |
st->duration = smk->frames; |
| 176 | 176 |
/* handle possible audio streams */ |
| 177 | 177 |
for(i = 0; i < 7; i++) {
|
| ... | ... |
@@ -195,7 +196,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 195 | 195 |
ast[i]->codec->bits_per_coded_sample = (smk->aflags[i] & SMK_AUD_16BITS) ? 16 : 8; |
| 196 | 196 |
if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == CODEC_ID_PCM_U8) |
| 197 | 197 |
ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE; |
| 198 |
- av_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate |
|
| 198 |
+ avpriv_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate |
|
| 199 | 199 |
* ast[i]->codec->channels * ast[i]->codec->bits_per_coded_sample / 8); |
| 200 | 200 |
} |
| 201 | 201 |
} |
| ... | ... |
@@ -25,6 +25,7 @@ |
| 25 | 25 |
|
| 26 | 26 |
#include "libavutil/intreadwrite.h" |
| 27 | 27 |
#include "avformat.h" |
| 28 |
+#include "internal.h" |
|
| 28 | 29 |
#include "pcm.h" |
| 29 | 30 |
|
| 30 | 31 |
/* if we don't know the size in advance */ |
| ... | ... |
@@ -117,7 +118,7 @@ static int sol_read_header(AVFormatContext *s, |
| 117 | 117 |
st->codec->codec_id = codec; |
| 118 | 118 |
st->codec->channels = channels; |
| 119 | 119 |
st->codec->sample_rate = rate; |
| 120 |
- av_set_pts_info(st, 64, 1, rate); |
|
| 120 |
+ avpriv_set_pts_info(st, 64, 1, rate); |
|
| 121 | 121 |
return 0; |
| 122 | 122 |
} |
| 123 | 123 |
|
| ... | ... |
@@ -33,6 +33,7 @@ |
| 33 | 33 |
#include "libavutil/intfloat_readwrite.h" |
| 34 | 34 |
#include "libavutil/dict.h" |
| 35 | 35 |
#include "avformat.h" |
| 36 |
+#include "internal.h" |
|
| 36 | 37 |
#include "pcm.h" |
| 37 | 38 |
#include "sox.h" |
| 38 | 39 |
|
| ... | ... |
@@ -117,7 +118,7 @@ static int sox_read_header(AVFormatContext *s, |
| 117 | 117 |
st->codec->block_align = st->codec->bits_per_coded_sample * |
| 118 | 118 |
st->codec->channels / 8; |
| 119 | 119 |
|
| 120 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 120 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 121 | 121 |
|
| 122 | 122 |
return 0; |
| 123 | 123 |
} |
| ... | ... |
@@ -45,7 +45,7 @@ static int srt_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 45 | 45 |
AVStream *st = avformat_new_stream(s, NULL); |
| 46 | 46 |
if (!st) |
| 47 | 47 |
return -1; |
| 48 |
- av_set_pts_info(st, 64, 1, 1000); |
|
| 48 |
+ avpriv_set_pts_info(st, 64, 1, 1000); |
|
| 49 | 49 |
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE; |
| 50 | 50 |
st->codec->codec_id = CODEC_ID_SRT; |
| 51 | 51 |
return 0; |
| ... | ... |
@@ -112,7 +112,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 112 | 112 |
vst->id = ch_id; |
| 113 | 113 |
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 114 | 114 |
vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, avio_r8(pb)); |
| 115 |
- av_set_pts_info(vst, 16, 256, swf->frame_rate); |
|
| 115 |
+ avpriv_set_pts_info(vst, 16, 256, swf->frame_rate); |
|
| 116 | 116 |
vst->codec->time_base = (AVRational){ 256, swf->frame_rate };
|
| 117 | 117 |
len -= 8; |
| 118 | 118 |
} else if (tag == TAG_STREAMHEAD || tag == TAG_STREAMHEAD2) {
|
| ... | ... |
@@ -141,7 +141,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 141 | 141 |
ast->codec->sample_rate = 5512; |
| 142 | 142 |
else |
| 143 | 143 |
ast->codec->sample_rate = 11025 << (sample_rate_code-1); |
| 144 |
- av_set_pts_info(ast, 64, 1, ast->codec->sample_rate); |
|
| 144 |
+ avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate); |
|
| 145 | 145 |
len -= 4; |
| 146 | 146 |
} else if (tag == TAG_VIDEOFRAME) {
|
| 147 | 147 |
int ch_id = avio_rl16(pb); |
| ... | ... |
@@ -185,7 +185,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 185 | 185 |
vst->id = -2; /* -2 to avoid clash with video stream and audio stream */ |
| 186 | 186 |
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 187 | 187 |
vst->codec->codec_id = CODEC_ID_MJPEG; |
| 188 |
- av_set_pts_info(vst, 64, 256, swf->frame_rate); |
|
| 188 |
+ avpriv_set_pts_info(vst, 64, 256, swf->frame_rate); |
|
| 189 | 189 |
vst->codec->time_base = (AVRational){ 256, swf->frame_rate };
|
| 190 | 190 |
st = vst; |
| 191 | 191 |
} |
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include "libavutil/intreadwrite.h" |
| 23 | 23 |
#include "libavutil/intfloat_readwrite.h" |
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
|
| 26 | 27 |
typedef struct ThpDemuxContext {
|
| 27 | 28 |
int version; |
| ... | ... |
@@ -100,7 +101,7 @@ static int thp_read_header(AVFormatContext *s, |
| 100 | 100 |
|
| 101 | 101 |
/* The denominator and numerator are switched because 1/fps |
| 102 | 102 |
is required. */ |
| 103 |
- av_set_pts_info(st, 64, thp->fps.den, thp->fps.num); |
|
| 103 |
+ avpriv_set_pts_info(st, 64, thp->fps.den, thp->fps.num); |
|
| 104 | 104 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 105 | 105 |
st->codec->codec_id = CODEC_ID_THP; |
| 106 | 106 |
st->codec->codec_tag = 0; /* no fourcc */ |
| ... | ... |
@@ -127,7 +128,7 @@ static int thp_read_header(AVFormatContext *s, |
| 127 | 127 |
st->codec->channels = avio_rb32(pb); /* numChannels. */ |
| 128 | 128 |
st->codec->sample_rate = avio_rb32(pb); /* Frequency. */ |
| 129 | 129 |
|
| 130 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 130 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 131 | 131 |
|
| 132 | 132 |
thp->audio_stream_index = st->index; |
| 133 | 133 |
thp->has_audio = 1; |
| ... | ... |
@@ -25,6 +25,7 @@ |
| 25 | 25 |
*/ |
| 26 | 26 |
|
| 27 | 27 |
#include "avformat.h" |
| 28 |
+#include "internal.h" |
|
| 28 | 29 |
|
| 29 | 30 |
#define SEQ_FRAME_SIZE 6144 |
| 30 | 31 |
#define SEQ_FRAME_W 256 |
| ... | ... |
@@ -210,7 +211,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 210 | 210 |
if (!st) |
| 211 | 211 |
return AVERROR(ENOMEM); |
| 212 | 212 |
|
| 213 |
- av_set_pts_info(st, 32, 1, SEQ_FRAME_RATE); |
|
| 213 |
+ avpriv_set_pts_info(st, 32, 1, SEQ_FRAME_RATE); |
|
| 214 | 214 |
seq->video_stream_index = st->index; |
| 215 | 215 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 216 | 216 |
st->codec->codec_id = CODEC_ID_TIERTEXSEQVIDEO; |
| ... | ... |
@@ -223,7 +224,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 223 | 223 |
if (!st) |
| 224 | 224 |
return AVERROR(ENOMEM); |
| 225 | 225 |
|
| 226 |
- av_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE); |
|
| 226 |
+ avpriv_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE); |
|
| 227 | 227 |
seq->audio_stream_index = st->index; |
| 228 | 228 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 229 | 229 |
st->codec->codec_id = CODEC_ID_PCM_S16BE; |
| ... | ... |
@@ -28,6 +28,7 @@ |
| 28 | 28 |
|
| 29 | 29 |
#include "libavutil/intreadwrite.h" |
| 30 | 30 |
#include "avformat.h" |
| 31 |
+#include "internal.h" |
|
| 31 | 32 |
|
| 32 | 33 |
enum {
|
| 33 | 34 |
TMV_PADDING = 0x01, |
| ... | ... |
@@ -115,7 +116,7 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 115 | 115 |
ast->codec->bits_per_coded_sample = 8; |
| 116 | 116 |
ast->codec->bit_rate = ast->codec->sample_rate * |
| 117 | 117 |
ast->codec->bits_per_coded_sample; |
| 118 |
- av_set_pts_info(ast, 32, 1, ast->codec->sample_rate); |
|
| 118 |
+ avpriv_set_pts_info(ast, 32, 1, ast->codec->sample_rate); |
|
| 119 | 119 |
|
| 120 | 120 |
fps.num = ast->codec->sample_rate * ast->codec->channels; |
| 121 | 121 |
fps.den = tmv->audio_chunk_size; |
| ... | ... |
@@ -126,7 +127,7 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 126 | 126 |
vst->codec->pix_fmt = PIX_FMT_PAL8; |
| 127 | 127 |
vst->codec->width = char_cols * 8; |
| 128 | 128 |
vst->codec->height = char_rows * 8; |
| 129 |
- av_set_pts_info(vst, 32, fps.den, fps.num); |
|
| 129 |
+ avpriv_set_pts_info(vst, 32, fps.den, fps.num); |
|
| 130 | 130 |
|
| 131 | 131 |
if (features & TMV_PADDING) |
| 132 | 132 |
tmv->padding = |
| ... | ... |
@@ -21,6 +21,7 @@ |
| 21 | 21 |
|
| 22 | 22 |
#include "libavcodec/get_bits.h" |
| 23 | 23 |
#include "avformat.h" |
| 24 |
+#include "internal.h" |
|
| 24 | 25 |
#include "id3v1.h" |
| 25 | 26 |
#include "libavutil/dict.h" |
| 26 | 27 |
|
| ... | ... |
@@ -81,7 +82,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 81 | 81 |
if (!st) |
| 82 | 82 |
return AVERROR(ENOMEM); |
| 83 | 83 |
|
| 84 |
- av_set_pts_info(st, 64, 1, samplerate); |
|
| 84 |
+ avpriv_set_pts_info(st, 64, 1, samplerate); |
|
| 85 | 85 |
st->start_time = 0; |
| 86 | 86 |
st->duration = datalen; |
| 87 | 87 |
|
| ... | ... |
@@ -31,6 +31,7 @@ |
| 31 | 31 |
#include "libavutil/opt.h" |
| 32 | 32 |
#include "libavutil/parseutils.h" |
| 33 | 33 |
#include "avformat.h" |
| 34 |
+#include "internal.h" |
|
| 34 | 35 |
#include "sauce.h" |
| 35 | 36 |
|
| 36 | 37 |
typedef struct {
|
| ... | ... |
@@ -97,7 +98,7 @@ static int read_header(AVFormatContext *avctx, |
| 97 | 97 |
} |
| 98 | 98 |
st->codec->width = width; |
| 99 | 99 |
st->codec->height = height; |
| 100 |
- av_set_pts_info(st, 60, framerate.den, framerate.num); |
|
| 100 |
+ avpriv_set_pts_info(st, 60, framerate.den, framerate.num); |
|
| 101 | 101 |
|
| 102 | 102 |
/* simulate tty display speed */ |
| 103 | 103 |
s->chars_per_frame = FFMAX(av_q2d(st->time_base)*s->chars_per_frame, 1); |
| ... | ... |
@@ -2739,7 +2739,7 @@ AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c) |
| 2739 | 2739 |
st->probe_packets = MAX_PROBE_PACKETS; |
| 2740 | 2740 |
|
| 2741 | 2741 |
/* default pts setting is MPEG-like */ |
| 2742 |
- av_set_pts_info(st, 33, 1, 90000); |
|
| 2742 |
+ avpriv_set_pts_info(st, 33, 1, 90000); |
|
| 2743 | 2743 |
st->last_IP_pts = AV_NOPTS_VALUE; |
| 2744 | 2744 |
for(i=0; i<MAX_REORDER_DELAY+1; i++) |
| 2745 | 2745 |
st->pts_buffer[i]= AV_NOPTS_VALUE; |
| ... | ... |
@@ -3742,9 +3742,17 @@ int ff_hex_to_data(uint8_t *data, const char *p) |
| 3742 | 3742 |
return len; |
| 3743 | 3743 |
} |
| 3744 | 3744 |
|
| 3745 |
+#if FF_API_SET_PTS_INFO |
|
| 3745 | 3746 |
void av_set_pts_info(AVStream *s, int pts_wrap_bits, |
| 3746 | 3747 |
unsigned int pts_num, unsigned int pts_den) |
| 3747 | 3748 |
{
|
| 3749 |
+ avpriv_set_pts_info(s, pts_wrap_bits, pts_num, pts_den); |
|
| 3750 |
+} |
|
| 3751 |
+#endif |
|
| 3752 |
+ |
|
| 3753 |
+void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits, |
|
| 3754 |
+ unsigned int pts_num, unsigned int pts_den) |
|
| 3755 |
+{
|
|
| 3748 | 3756 |
AVRational new_tb; |
| 3749 | 3757 |
if(av_reduce(&new_tb.num, &new_tb.den, pts_num, pts_den, INT_MAX)){
|
| 3750 | 3758 |
if(new_tb.num != pts_num) |
| ... | ... |
@@ -28,6 +28,7 @@ |
| 28 | 28 |
|
| 29 | 29 |
#include "libavutil/intreadwrite.h" |
| 30 | 30 |
#include "avformat.h" |
| 31 |
+#include "internal.h" |
|
| 31 | 32 |
|
| 32 | 33 |
#define VC1_EXTRADATA_SIZE 4 |
| 33 | 34 |
|
| ... | ... |
@@ -71,13 +72,13 @@ static int vc1t_read_header(AVFormatContext *s, |
| 71 | 71 |
avio_skip(pb, 8); |
| 72 | 72 |
fps = avio_rl32(pb); |
| 73 | 73 |
if(fps == 0xFFFFFFFF) |
| 74 |
- av_set_pts_info(st, 32, 1, 1000); |
|
| 74 |
+ avpriv_set_pts_info(st, 32, 1, 1000); |
|
| 75 | 75 |
else{
|
| 76 | 76 |
if (!fps) {
|
| 77 | 77 |
av_log(s, AV_LOG_ERROR, "Zero FPS specified, defaulting to 1 FPS\n"); |
| 78 | 78 |
fps = 1; |
| 79 | 79 |
} |
| 80 |
- av_set_pts_info(st, 24, 1, fps); |
|
| 80 |
+ avpriv_set_pts_info(st, 24, 1, fps); |
|
| 81 | 81 |
st->duration = frames; |
| 82 | 82 |
} |
| 83 | 83 |
|
| ... | ... |
@@ -19,6 +19,7 @@ |
| 19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | 20 |
*/ |
| 21 | 21 |
#include "avformat.h" |
| 22 |
+#include "internal.h" |
|
| 22 | 23 |
|
| 23 | 24 |
typedef struct RCVContext {
|
| 24 | 25 |
int frames; |
| ... | ... |
@@ -47,7 +48,7 @@ static int vc1test_write_header(AVFormatContext *s) |
| 47 | 47 |
avio_wl32(pb, s->streams[0]->r_frame_rate.den); |
| 48 | 48 |
else |
| 49 | 49 |
avio_wl32(pb, 0xFFFFFFFF); //variable framerate |
| 50 |
- av_set_pts_info(s->streams[0], 32, 1, 1000); |
|
| 50 |
+ avpriv_set_pts_info(s->streams[0], 32, 1, 1000); |
|
| 51 | 51 |
|
| 52 | 52 |
return 0; |
| 53 | 53 |
} |
| ... | ... |
@@ -113,5 +113,8 @@ |
| 113 | 113 |
#ifndef FF_API_OLD_INTERRUPT_CB |
| 114 | 114 |
#define FF_API_OLD_INTERRUPT_CB (LIBAVFORMAT_VERSION_MAJOR < 54) |
| 115 | 115 |
#endif |
| 116 |
+#ifndef FF_API_SET_PTS_INFO |
|
| 117 |
+#define FF_API_SET_PTS_INFO (LIBAVFORMAT_VERSION_MAJOR < 54) |
|
| 118 |
+#endif |
|
| 116 | 119 |
|
| 117 | 120 |
#endif /* AVFORMAT_VERSION_H */ |
| ... | ... |
@@ -20,6 +20,7 @@ |
| 20 | 20 |
*/ |
| 21 | 21 |
|
| 22 | 22 |
#include "avformat.h" |
| 23 |
+#include "internal.h" |
|
| 23 | 24 |
#include "libavutil/intreadwrite.h" |
| 24 | 25 |
#include "libavutil/dict.h" |
| 25 | 26 |
#include "libavutil/mathematics.h" |
| ... | ... |
@@ -192,7 +193,7 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 192 | 192 |
return -1; |
| 193 | 193 |
} |
| 194 | 194 |
c->frame_bit_len = st->codec->bit_rate*size/st->codec->sample_rate; |
| 195 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 195 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 196 | 196 |
|
| 197 | 197 |
/* put first 12 bytes of COMM chunk in extradata */ |
| 198 | 198 |
if (!(st->codec->extradata = av_malloc(12 + FF_INPUT_BUFFER_PADDING_SIZE))) |
| ... | ... |
@@ -29,6 +29,7 @@ |
| 29 | 29 |
#include "libavutil/mathematics.h" |
| 30 | 30 |
#include "libavutil/opt.h" |
| 31 | 31 |
#include "avformat.h" |
| 32 |
+#include "internal.h" |
|
| 32 | 33 |
#include "avio_internal.h" |
| 33 | 34 |
#include "pcm.h" |
| 34 | 35 |
#include "riff.h" |
| ... | ... |
@@ -130,7 +131,7 @@ static int wav_write_header(AVFormatContext *s) |
| 130 | 130 |
if (wav->write_bext) |
| 131 | 131 |
bwf_write_bext_chunk(s); |
| 132 | 132 |
|
| 133 |
- av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); |
|
| 133 |
+ avpriv_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); |
|
| 134 | 134 |
wav->maxpts = wav->last_duration = 0; |
| 135 | 135 |
wav->minpts = INT64_MAX; |
| 136 | 136 |
|
| ... | ... |
@@ -281,7 +282,7 @@ static int wav_parse_fmt_tag(AVFormatContext *s, int64_t size, AVStream **st) |
| 281 | 281 |
return ret; |
| 282 | 282 |
(*st)->need_parsing = AVSTREAM_PARSE_FULL; |
| 283 | 283 |
|
| 284 |
- av_set_pts_info(*st, 64, 1, (*st)->codec->sample_rate); |
|
| 284 |
+ avpriv_set_pts_info(*st, 64, 1, (*st)->codec->sample_rate); |
|
| 285 | 285 |
|
| 286 | 286 |
return 0; |
| 287 | 287 |
} |
| ... | ... |
@@ -660,7 +661,7 @@ static int w64_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 660 | 660 |
|
| 661 | 661 |
st->need_parsing = AVSTREAM_PARSE_FULL; |
| 662 | 662 |
|
| 663 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 663 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 664 | 664 |
|
| 665 | 665 |
size = find_guid(pb, guid_data); |
| 666 | 666 |
if (size < 0) {
|
| ... | ... |
@@ -30,6 +30,7 @@ |
| 30 | 30 |
#include "libavutil/intreadwrite.h" |
| 31 | 31 |
#include "libavutil/dict.h" |
| 32 | 32 |
#include "avformat.h" |
| 33 |
+#include "internal.h" |
|
| 33 | 34 |
|
| 34 | 35 |
#define FORM_TAG MKTAG('F', 'O', 'R', 'M')
|
| 35 | 36 |
#define MOVE_TAG MKTAG('M', 'O', 'V', 'E')
|
| ... | ... |
@@ -166,7 +167,7 @@ static int wc3_read_header(AVFormatContext *s, |
| 166 | 166 |
st = avformat_new_stream(s, NULL); |
| 167 | 167 |
if (!st) |
| 168 | 168 |
return AVERROR(ENOMEM); |
| 169 |
- av_set_pts_info(st, 33, 1, WC3_FRAME_FPS); |
|
| 169 |
+ avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS); |
|
| 170 | 170 |
wc3->video_stream_index = st->index; |
| 171 | 171 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 172 | 172 |
st->codec->codec_id = CODEC_ID_XAN_WC3; |
| ... | ... |
@@ -177,7 +178,7 @@ static int wc3_read_header(AVFormatContext *s, |
| 177 | 177 |
st = avformat_new_stream(s, NULL); |
| 178 | 178 |
if (!st) |
| 179 | 179 |
return AVERROR(ENOMEM); |
| 180 |
- av_set_pts_info(st, 33, 1, WC3_FRAME_FPS); |
|
| 180 |
+ avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS); |
|
| 181 | 181 |
wc3->audio_stream_index = st->index; |
| 182 | 182 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 183 | 183 |
st->codec->codec_id = CODEC_ID_PCM_S16LE; |
| ... | ... |
@@ -35,6 +35,7 @@ |
| 35 | 35 |
|
| 36 | 36 |
#include "libavutil/intreadwrite.h" |
| 37 | 37 |
#include "avformat.h" |
| 38 |
+#include "internal.h" |
|
| 38 | 39 |
|
| 39 | 40 |
#define AUD_HEADER_SIZE 12 |
| 40 | 41 |
#define AUD_CHUNK_PREAMBLE_SIZE 8 |
| ... | ... |
@@ -147,7 +148,7 @@ static int wsaud_read_header(AVFormatContext *s, |
| 147 | 147 |
st = avformat_new_stream(s, NULL); |
| 148 | 148 |
if (!st) |
| 149 | 149 |
return AVERROR(ENOMEM); |
| 150 |
- av_set_pts_info(st, 33, 1, wsaud->audio_samplerate); |
|
| 150 |
+ avpriv_set_pts_info(st, 33, 1, wsaud->audio_samplerate); |
|
| 151 | 151 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 152 | 152 |
st->codec->codec_id = wsaud->audio_type; |
| 153 | 153 |
st->codec->codec_tag = 0; /* no tag */ |
| ... | ... |
@@ -224,7 +225,7 @@ static int wsvqa_read_header(AVFormatContext *s, |
| 224 | 224 |
st = avformat_new_stream(s, NULL); |
| 225 | 225 |
if (!st) |
| 226 | 226 |
return AVERROR(ENOMEM); |
| 227 |
- av_set_pts_info(st, 33, 1, VQA_FRAMERATE); |
|
| 227 |
+ avpriv_set_pts_info(st, 33, 1, VQA_FRAMERATE); |
|
| 228 | 228 |
wsvqa->video_stream_index = st->index; |
| 229 | 229 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 230 | 230 |
st->codec->codec_id = CODEC_ID_WS_VQA; |
| ... | ... |
@@ -250,7 +251,7 @@ static int wsvqa_read_header(AVFormatContext *s, |
| 250 | 250 |
st = avformat_new_stream(s, NULL); |
| 251 | 251 |
if (!st) |
| 252 | 252 |
return AVERROR(ENOMEM); |
| 253 |
- av_set_pts_info(st, 33, 1, VQA_FRAMERATE); |
|
| 253 |
+ avpriv_set_pts_info(st, 33, 1, VQA_FRAMERATE); |
|
| 254 | 254 |
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| 255 | 255 |
if (AV_RL16(&header[0]) == 1) |
| 256 | 256 |
st->codec->codec_id = CODEC_ID_WESTWOOD_SND1; |
| ... | ... |
@@ -633,7 +633,7 @@ static AVStream * new_stream(AVFormatContext *s, AVStream *st, int sid, int code |
| 633 | 633 |
} |
| 634 | 634 |
st->codec->codec_type = codec_type; |
| 635 | 635 |
st->need_parsing = AVSTREAM_PARSE_FULL; |
| 636 |
- av_set_pts_info(st, 64, 1, 10000000); |
|
| 636 |
+ avpriv_set_pts_info(st, 64, 1, 10000000); |
|
| 637 | 637 |
return st; |
| 638 | 638 |
} |
| 639 | 639 |
|
| ... | ... |
@@ -23,6 +23,7 @@ |
| 23 | 23 |
#include "libavutil/intreadwrite.h" |
| 24 | 24 |
#include "libavutil/dict.h" |
| 25 | 25 |
#include "avformat.h" |
| 26 |
+#include "internal.h" |
|
| 26 | 27 |
#include "apetag.h" |
| 27 | 28 |
#include "id3v1.h" |
| 28 | 29 |
|
| ... | ... |
@@ -229,7 +230,7 @@ static int wv_read_header(AVFormatContext *s, |
| 229 | 229 |
st->codec->channel_layout = wc->chmask; |
| 230 | 230 |
st->codec->sample_rate = wc->rate; |
| 231 | 231 |
st->codec->bits_per_coded_sample = wc->bpp; |
| 232 |
- av_set_pts_info(st, 64, 1, wc->rate); |
|
| 232 |
+ avpriv_set_pts_info(st, 64, 1, wc->rate); |
|
| 233 | 233 |
st->start_time = 0; |
| 234 | 234 |
st->duration = wc->samples; |
| 235 | 235 |
|
| ... | ... |
@@ -29,6 +29,7 @@ |
| 29 | 29 |
|
| 30 | 30 |
#include "libavutil/intreadwrite.h" |
| 31 | 31 |
#include "avformat.h" |
| 32 |
+#include "internal.h" |
|
| 32 | 33 |
|
| 33 | 34 |
#define XA00_TAG MKTAG('X', 'A', 0, 0)
|
| 34 | 35 |
#define XAI0_TAG MKTAG('X', 'A', 'I', 0)
|
| ... | ... |
@@ -86,7 +87,7 @@ static int xa_read_header(AVFormatContext *s, |
| 86 | 86 |
st->codec->block_align = avio_rl16(pb); |
| 87 | 87 |
st->codec->bits_per_coded_sample = avio_rl16(pb); |
| 88 | 88 |
|
| 89 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 89 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 90 | 90 |
|
| 91 | 91 |
return 0; |
| 92 | 92 |
} |
| ... | ... |
@@ -30,6 +30,7 @@ |
| 30 | 30 |
#include "libavutil/intreadwrite.h" |
| 31 | 31 |
|
| 32 | 32 |
#include "avformat.h" |
| 33 |
+#include "internal.h" |
|
| 33 | 34 |
#include "riff.h" |
| 34 | 35 |
|
| 35 | 36 |
#define XMV_MIN_HEADER_SIZE 36 |
| ... | ... |
@@ -154,7 +155,7 @@ static int xmv_read_header(AVFormatContext *s, |
| 154 | 154 |
if (!vst) |
| 155 | 155 |
return AVERROR(ENOMEM); |
| 156 | 156 |
|
| 157 |
- av_set_pts_info(vst, 32, 1, 1000); |
|
| 157 |
+ avpriv_set_pts_info(vst, 32, 1, 1000); |
|
| 158 | 158 |
|
| 159 | 159 |
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 160 | 160 |
vst->codec->codec_id = CODEC_ID_WMV2; |
| ... | ... |
@@ -224,7 +225,7 @@ static int xmv_read_header(AVFormatContext *s, |
| 224 | 224 |
ast->codec->bit_rate = track->bit_rate; |
| 225 | 225 |
ast->codec->block_align = 36 * track->channels; |
| 226 | 226 |
|
| 227 |
- av_set_pts_info(ast, 32, track->block_samples, track->sample_rate); |
|
| 227 |
+ avpriv_set_pts_info(ast, 32, track->block_samples, track->sample_rate); |
|
| 228 | 228 |
|
| 229 | 229 |
packet->stream_index = ast->index; |
| 230 | 230 |
|
| ... | ... |
@@ -22,6 +22,7 @@ |
| 22 | 22 |
#include <inttypes.h> |
| 23 | 23 |
|
| 24 | 24 |
#include "avformat.h" |
| 25 |
+#include "internal.h" |
|
| 25 | 26 |
#include "riff.h" |
| 26 | 27 |
|
| 27 | 28 |
/* |
| ... | ... |
@@ -115,7 +116,7 @@ static int xwma_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 115 | 115 |
} |
| 116 | 116 |
|
| 117 | 117 |
/* set the sample rate */ |
| 118 |
- av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 118 |
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |
|
| 119 | 119 |
|
| 120 | 120 |
/* parse the remaining RIFF chunks */ |
| 121 | 121 |
for (;;) {
|
| ... | ... |
@@ -24,6 +24,7 @@ |
| 24 | 24 |
|
| 25 | 25 |
#include "libavutil/intreadwrite.h" |
| 26 | 26 |
#include "avformat.h" |
| 27 |
+#include "internal.h" |
|
| 27 | 28 |
|
| 28 | 29 |
typedef struct yop_dec_context {
|
| 29 | 30 |
AVPacket video_packet; |
| ... | ... |
@@ -105,7 +106,7 @@ static int yop_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 105 | 105 |
|
| 106 | 106 |
avio_seek(pb, 2048, SEEK_SET); |
| 107 | 107 |
|
| 108 |
- av_set_pts_info(video_stream, 32, 1, frame_rate); |
|
| 108 |
+ avpriv_set_pts_info(video_stream, 32, 1, frame_rate); |
|
| 109 | 109 |
|
| 110 | 110 |
return 0; |
| 111 | 111 |
} |
| ... | ... |
@@ -19,6 +19,7 @@ |
| 19 | 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | 20 |
*/ |
| 21 | 21 |
#include "avformat.h" |
| 22 |
+#include "internal.h" |
|
| 22 | 23 |
|
| 23 | 24 |
#define Y4M_MAGIC "YUV4MPEG2" |
| 24 | 25 |
#define Y4M_FRAME_MAGIC "FRAME" |
| ... | ... |
@@ -333,7 +334,7 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 333 | 333 |
st->codec->width = width; |
| 334 | 334 |
st->codec->height = height; |
| 335 | 335 |
av_reduce(&raten, &rated, raten, rated, (1UL<<31)-1); |
| 336 |
- av_set_pts_info(st, 64, rated, raten); |
|
| 336 |
+ avpriv_set_pts_info(st, 64, rated, raten); |
|
| 337 | 337 |
st->codec->pix_fmt = pix_fmt; |
| 338 | 338 |
st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 339 | 339 |
st->codec->codec_id = CODEC_ID_RAWVIDEO; |