aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2014-05-02 17:13:27 +0200
committerMarton Balint <cus@passwd.hu>2014-05-05 22:33:52 +0200
commita78274329c0b1ea9964b4fa1bf6f4683e797e453 (patch)
tree4fc3d0cae07298fe89d870257b922e2239073026
parentd7ca914988439d267382b8b403a7e698f9a0c8ab (diff)
downloadffmpeg-a78274329c0b1ea9964b4fa1bf6f4683e797e453.tar.gz
mpegts: unref buffer in reset_pes_packet_state
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--libavformat/mpegts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 1bd697a71f..7ed7bb4b2f 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -791,9 +791,9 @@ static void reset_pes_packet_state(PESContext *pes)
{
pes->pts = AV_NOPTS_VALUE;
pes->dts = AV_NOPTS_VALUE;
- pes->buffer = NULL;
pes->data_index = 0;
pes->flags = 0;
+ av_buffer_unref(&pes->buffer);
}
static void new_pes_packet(PESContext *pes, AVPacket *pkt)
@@ -823,6 +823,7 @@ static void new_pes_packet(PESContext *pes, AVPacket *pkt)
pkt->pos = pes->ts_packet_pos;
pkt->flags = pes->flags;
+ pes->buffer = NULL;
reset_pes_packet_state(pes);
}