summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-18 18:18:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-18 19:49:17 +0200
commitac293b66851f6c4461eab03ca91af59d5ee4e02e (patch)
tree4bcf9e474aaec1e346c368660b52e4630059e380 /libavformat/utils.c
parent88514378bac99872265dad28072fb30160b26bfa (diff)
parent194be1f43ea391eb986732707435176e579265aa (diff)
Merge commit '194be1f43ea391eb986732707435176e579265aa'
* commit '194be1f43ea391eb986732707435176e579265aa': lavf: switch to AVStream.time_base as the hint for the muxer timebase Conflicts: doc/APIchanges libavformat/filmstripenc.c libavformat/movenc.c libavformat/mxfenc.c libavformat/oggenc.c libavformat/swf.h libavformat/version.h tests/ref/lavf/mkv Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 723eff6bd8..517d919e1d 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3738,9 +3738,14 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
st->info->last_dts = AV_NOPTS_VALUE;
st->codec = avcodec_alloc_context3(c);
- if (s->iformat)
+ if (s->iformat) {
/* no default bitrate if decoding */
st->codec->bit_rate = 0;
+
+ /* default pts setting is MPEG-like */
+ avpriv_set_pts_info(st, 33, 1, 90000);
+ }
+
st->index = s->nb_streams;
st->start_time = AV_NOPTS_VALUE;
st->duration = AV_NOPTS_VALUE;
@@ -3754,8 +3759,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
st->pts_wrap_reference = AV_NOPTS_VALUE;
st->pts_wrap_behavior = AV_PTS_WRAP_IGNORE;
- /* default pts setting is MPEG-like */
- avpriv_set_pts_info(st, 33, 1, 90000);
st->last_IP_pts = AV_NOPTS_VALUE;
st->last_dts_for_order_check = AV_NOPTS_VALUE;
for (i = 0; i < MAX_REORDER_DELAY + 1; i++)