Message ID | 20210304154233.934640-6-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | b5a2481122c1d85030bc69064248734953e9da88 |
Headers | show |
Series | [FFmpeg-devel,1/8] avcodec/decode: constify the source packet parameter in extract_packet_props() | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
On 3/4/2021 12:42 PM, Andreas Rheinhardt wrote: > AVCodecInternal.last_pkt_props is not used when decoding subtitles; > ergo it makes no sense to set it at all. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavcodec/decode.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/libavcodec/decode.c b/libavcodec/decode.c > index 84c4039836..04cb050dc7 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); > } LGTM
diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 84c4039836..04cb050dc7 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); }
AVCodecInternal.last_pkt_props is not used when decoding subtitles; ergo it makes no sense to set it at all. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/decode.c | 5 ----- 1 file changed, 5 deletions(-)