[FFmpeg-devel] [PATCH] lavc/hevc_parser: remove repeated profile/level settings
Hendrik Leppkes
h.leppkes at gmail.com
Sat Jan 30 11:56:36 EET 2021
On Sat, Jan 30, 2021 at 7:58 AM Linjie Fu <linjie.justin.fu at gmail.com> wrote:
>
> Since avctx->profile/level would be set in export_stream_params()
> in set_sps(), identical codes here seem to be redundant.
>
> Signed-off-by: Linjie Fu <linjie.justin.fu at gmail.com>
> ---
> libavcodec/hevc_parser.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
> index 463d352055..0eb7fb074c 100644
> --- a/libavcodec/hevc_parser.c
> +++ b/libavcodec/hevc_parser.c
> @@ -95,8 +95,6 @@ static int hevc_parse_slice_header(AVCodecParserContext *s, H2645NAL *nal,
> s->width = ps->sps->width - ow->left_offset - ow->right_offset;
> s->height = ps->sps->height - ow->top_offset - ow->bottom_offset;
> s->format = ps->sps->pix_fmt;
> - avctx->profile = ps->sps->ptl.general_ptl.profile_idc;
> - avctx->level = ps->sps->ptl.general_ptl.level_idc;
>
> if (ps->vps->vps_timing_info_present_flag) {
> num = ps->vps->vps_num_units_in_tick;
This is in the parser, not the decoder, an independent component, and
the parser does not export this information through other means, this
without it, it would be exporting less information then it does now.
Please leave this in. :)
- Hendrik
More information about the ffmpeg-devel
mailing list