diff options
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r-- | libavformat/mux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c index 87220ecd63..9aee224d1f 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -329,12 +329,12 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) AVRational time_base = s->streams[pkt->stream_index]->time_base; int64_t offset = 0; - if (!s->offset && pkt->dts != AV_NOPTS_VALUE && + if (s->offset == AV_NOPTS_VALUE && pkt->dts != AV_NOPTS_VALUE && (pkt->dts < 0 || s->avoid_negative_ts == AVFMT_AVOID_NEG_TS_MAKE_ZERO)) { s->offset = -pkt->dts; s->offset_timebase = time_base; } - if (s->offset) + if (s->offset != AV_NOPTS_VALUE) offset = av_rescale_q(s->offset, s->offset_timebase, time_base); if (pkt->dts != AV_NOPTS_VALUE) |