[FFmpeg-cvslog] hls: use av_compare_ts() instead of comparing apples to oranges.
Michael Niedermayer
git at videolan.org
Tue Aug 21 01:07:32 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Aug 21 01:00:05 2012 +0200| [7123e9506b0490069aef1635680ea506d0c1e166] | committer: Michael Niedermayer
hls: use av_compare_ts() instead of comparing apples to oranges.
Fixes Ticket983
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7123e9506b0490069aef1635680ea506d0c1e166
---
libavformat/hls.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 7add01f..41ba434 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -646,8 +646,10 @@ start:
}
/* Check if this stream has the packet with the lowest dts */
if (var->pkt.data) {
+ struct variant *minvar = c->variants[minvariant];
if (minvariant < 0 ||
- var->pkt.dts < c->variants[minvariant]->pkt.dts)
+ av_compare_ts(var->pkt.dts, var->ctx->streams[var->pkt.stream_index]->time_base,
+ minvar->pkt.dts, minvar->ctx->streams[minvar->pkt.stream_index]->time_base) > 0)
minvariant = i;
}
}
More information about the ffmpeg-cvslog
mailing list