]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/decode: Don't needlessly copy side-data for subtitles
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 4 Mar 2021 12:49:20 +0000 (13:49 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 9 Mar 2021 13:16:35 +0000 (14:16 +0100)
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>
libavcodec/decode.c

index 750e9e13bee9f0c2863f3a3a7d8608967ed57fc8..14de70b3f8a6d01fb9c029a870215f89e0d33270 100644 (file)
@@ -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);
     }