diff options
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 63afe2f..659bfa7 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1215,7 +1215,7 @@ resync: pkt->buf = avbuf; pkt->flags |= AV_PKT_FLAG_KEY; if (size < 0) - av_free_packet(pkt); + av_packet_unref(pkt); } else if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE && !st->codec->codec_tag && read_gab2_sub(st, pkt)) { ast->frame_offset++; @@ -1470,7 +1470,7 @@ static void seek_subtitle(AVStream *st, AVStream *st2, int64_t timestamp) { AVIStream *ast2 = st2->priv_data; int64_t ts2 = av_rescale_q(timestamp, st->time_base, st2->time_base); - av_free_packet(&ast2->sub_pkt); + av_packet_unref(&ast2->sub_pkt); if (avformat_seek_file(ast2->sub_ctx, 0, INT64_MIN, ts2, ts2, 0) >= 0 || avformat_seek_file(ast2->sub_ctx, 0, ts2, ts2, INT64_MAX, 0) >= 0) ff_read_packet(ast2->sub_ctx, &ast2->sub_pkt); @@ -1587,7 +1587,7 @@ static int avi_read_close(AVFormatContext *s) avformat_close_input(&ast->sub_ctx); } av_free(ast->sub_buffer); - av_free_packet(&ast->sub_pkt); + av_packet_unref(&ast->sub_pkt); } } |