aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDale Curtis <dalecurtis@chromium.org>2013-01-10 11:05:29 -0800
committerMichael Niedermayer <michaelni@gmx.at>2014-06-23 15:14:40 +0200
commit85b1ce977bd5d477cd47d0942e1a09f0a56e6778 (patch)
tree902fe49806b85043a3cab42e3d6afb9045633338
parent0916d0f9d1b94b4bb88382edae45b9276746574d (diff)
downloadffmpeg-85b1ce977bd5d477cd47d0942e1a09f0a56e6778.tar.gz
matroska: Fix use after free
Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Luca Barbato <lu_zero@gentoo.org> (cherry picked from commit ae3d41636942cbc0236bad21ad06c65f4eb0f096) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/matroskadec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 44c1a8fe17..59130f1ffd 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1880,6 +1880,7 @@ static int matroska_deliver_packet(MatroskaDemuxContext *matroska,
*/
static void matroska_clear_queue(MatroskaDemuxContext *matroska)
{
+ matroska->prev_pkt = NULL;
if (matroska->packets) {
int n;
for (n = 0; n < matroska->num_packets; n++) {
@@ -2393,7 +2394,6 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
avio_seek(s->pb, st->index_entries[st->nb_index_entries-1].pos, SEEK_SET);
matroska->current_id = 0;
while ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
- matroska->prev_pkt = NULL;
matroska_clear_queue(matroska);
if (matroska_parse_cluster(matroska) < 0)
break;