summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-27 15:42:59 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-27 15:42:59 +0100
commit6255bf3d0d2ee843ede8c0d74e4b35d2fd574b48 (patch)
tree4298f0e1abc8db0def33480d8afc1f53b2bf9e33
parent75c3e54d1cb03c74a6e2f6cce598364e83d2fb91 (diff)
downloadffmpeg-streaming-6255bf3d0d2ee843ede8c0d74e4b35d2fd574b48.zip
ffmpeg-streaming-6255bf3d0d2ee843ede8c0d74e4b35d2fd574b48.tar.gz
mpegts: Fix FATE seek test
-rw-r--r--libavformat/mpegts.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 0f0f503..1d57947 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2743,16 +2743,18 @@ static int64_t mpegts_get_dts(AVFormatContext *s, int stream_index,
ret = av_read_frame(s, &pkt);
if (ret < 0)
return AV_NOPTS_VALUE;
- av_packet_unref(&pkt);
if (pkt.dts != AV_NOPTS_VALUE && pkt.pos >= 0) {
ff_reduce_index(s, pkt.stream_index);
av_add_index_entry(s->streams[pkt.stream_index], pkt.pos, pkt.dts, 0, 0, AVINDEX_KEYFRAME /* FIXME keyframe? */);
if (pkt.stream_index == stream_index && pkt.pos >= *ppos) {
+ int64_t dts = pkt.dts;
*ppos = pkt.pos;
- return pkt.dts;
+ av_packet_unref(&pkt);
+ return dts;
}
}
pos = pkt.pos;
+ av_packet_unref(&pkt);
}
return AV_NOPTS_VALUE;
OpenPOWER on IntegriCloud