summaryrefslogtreecommitdiffstats
path: root/libavformat/asfdec_f.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-27 15:29:12 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-27 15:29:12 +0100
commit75c3e54d1cb03c74a6e2f6cce598364e83d2fb91 (patch)
tree9e3f7e071474eb5e9bf2e82a1f437b5139e6340e /libavformat/asfdec_f.c
parentc2f861ca42fa1a2fb6f7e85abb7bd44f39c6f2c4 (diff)
downloadffmpeg-streaming-75c3e54d1cb03c74a6e2f6cce598364e83d2fb91.zip
ffmpeg-streaming-75c3e54d1cb03c74a6e2f6cce598364e83d2fb91.tar.gz
asfdec: fix FATE seek test
Diffstat (limited to 'libavformat/asfdec_f.c')
-rw-r--r--libavformat/asfdec_f.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
index 3865b0e..8b89a1a 100644
--- a/libavformat/asfdec_f.c
+++ b/libavformat/asfdec_f.c
@@ -1538,7 +1538,6 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index,
pts = pkt->dts;
- av_packet_unref(pkt);
if (pkt->flags & AV_PKT_FLAG_KEY) {
i = pkt->stream_index;
@@ -1552,9 +1551,12 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index,
pos - start_pos[i] + 1, AVINDEX_KEYFRAME);
start_pos[i] = asf_st->packet_pos + 1;
- if (pkt->stream_index == stream_index)
+ if (pkt->stream_index == stream_index) {
+ av_packet_unref(pkt);
break;
+ }
}
+ av_packet_unref(pkt);
}
*ppos = pos;
OpenPOWER on IntegriCloud