summaryrefslogtreecommitdiff
path: root/libavformat/flacdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-15 23:59:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-16 00:23:31 +0200
commitbdc812ab9edb31960d5a756aa59f6d612609f2cf (patch)
tree4e22fd6fb9f58d5f62c051e6e501dca71044402b /libavformat/flacdec.c
parent6d8ccc7ac7e6c039529971c9d3d21cbae8da4865 (diff)
downloadffmpeg-bdc812ab9edb31960d5a756aa59f6d612609f2cf.tar.gz
avformat/flacdec/flac_read_timestamp: free the correct packet
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/flacdec.c')
-rw-r--r--libavformat/flacdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index 1caa7b0b75..cd752e1a20 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -187,16 +187,16 @@ static av_unused int64_t flac_read_timestamp(AVFormatContext *s, int stream_inde
if (ret == AVERROR(EAGAIN))
continue;
else
- return AV_NOPTS_VALUE;
+ break;
}
av_init_packet(&out_pkt);
ret = av_parser_parse2(parser, st->codec,
&out_pkt.data, &out_pkt.size, pkt.data, pkt.size,
pkt.pts, pkt.dts, *ppos);
+ av_free_packet(&pkt);
if (out_pkt.size){
int size = out_pkt.size;
- av_free_packet(&out_pkt);
if (parser->pts != AV_NOPTS_VALUE){
// seeking may not have started from beginning of a frame
// calculate frame start position from next frame backwards