aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-04 13:49:20 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-09 14:16:35 +0100
commitb5a2481122c1d85030bc69064248734953e9da88 (patch)
tree98efae8ec53cb4ea1917a4a7fcc4c75d09d8594d
parente12923f683f468dc4ac7e412578625f2ef14cb7d (diff)
downloadffmpeg-b5a2481122c1d85030bc69064248734953e9da88.tar.gz
avcodec/decode: Don't needlessly copy side-data for subtitles
AVCodecInternal.last_pkt_props is not used when decoding subtitles; ergo it makes no sense to set it at all. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r--libavcodec/decode.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 750e9e13be..14de70b3f8 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1050,10 +1050,6 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
if (ret < 0)
return ret;
- ret = extract_packet_props(avctx->internal, pkt);
- if (ret < 0)
- goto cleanup;
-
if (avctx->pkt_timebase.num && avpkt->pts != AV_NOPTS_VALUE)
sub->pts = av_rescale_q(avpkt->pts,
avctx->pkt_timebase, AV_TIME_BASE_Q);
@@ -1099,7 +1095,6 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
if (*got_sub_ptr)
avctx->frame_number++;
- cleanup:
if (pkt == avci->buffer_pkt) // did we recode?
av_packet_unref(avci->buffer_pkt);
}