mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/flacdec/flac_read_timestamp: free the correct packet
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
6d8ccc7ac7
commit
bdc812ab9e
|
@ -187,16 +187,16 @@ static av_unused int64_t flac_read_timestamp(AVFormatContext *s, int stream_inde
|
||||||
if (ret == AVERROR(EAGAIN))
|
if (ret == AVERROR(EAGAIN))
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
return AV_NOPTS_VALUE;
|
break;
|
||||||
}
|
}
|
||||||
av_init_packet(&out_pkt);
|
av_init_packet(&out_pkt);
|
||||||
ret = av_parser_parse2(parser, st->codec,
|
ret = av_parser_parse2(parser, st->codec,
|
||||||
&out_pkt.data, &out_pkt.size, pkt.data, pkt.size,
|
&out_pkt.data, &out_pkt.size, pkt.data, pkt.size,
|
||||||
pkt.pts, pkt.dts, *ppos);
|
pkt.pts, pkt.dts, *ppos);
|
||||||
|
|
||||||
|
av_free_packet(&pkt);
|
||||||
if (out_pkt.size){
|
if (out_pkt.size){
|
||||||
int size = out_pkt.size;
|
int size = out_pkt.size;
|
||||||
av_free_packet(&out_pkt);
|
|
||||||
if (parser->pts != AV_NOPTS_VALUE){
|
if (parser->pts != AV_NOPTS_VALUE){
|
||||||
// seeking may not have started from beginning of a frame
|
// seeking may not have started from beginning of a frame
|
||||||
// calculate frame start position from next frame backwards
|
// calculate frame start position from next frame backwards
|
||||||
|
|
Loading…
Reference in New Issue