You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-29 05:57:37 +02:00
avcodec/h2645_parse: replace three bool arguments in ff_h2645_packet_split with a single flags one
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -573,7 +573,8 @@ static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
|
||||
|
||||
err = ff_h2645_packet_split(&priv->read_packet,
|
||||
frag->data + start, end - start,
|
||||
ctx->log_ctx, 1, 2, AV_CODEC_ID_H264, 1, 1);
|
||||
ctx->log_ctx, 2, AV_CODEC_ID_H264,
|
||||
H2645_FLAG_IS_NALFF | H2645_FLAG_SMALL_PADDING | H2645_FLAG_USE_REF);
|
||||
if (err < 0) {
|
||||
av_log(ctx->log_ctx, AV_LOG_ERROR, "Failed to split AVCC SPS array.\n");
|
||||
return err;
|
||||
@@ -597,7 +598,8 @@ static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
|
||||
|
||||
err = ff_h2645_packet_split(&priv->read_packet,
|
||||
frag->data + start, end - start,
|
||||
ctx->log_ctx, 1, 2, AV_CODEC_ID_H264, 1, 1);
|
||||
ctx->log_ctx, 2, AV_CODEC_ID_H264,
|
||||
H2645_FLAG_IS_NALFF | H2645_FLAG_SMALL_PADDING | H2645_FLAG_USE_REF);
|
||||
if (err < 0) {
|
||||
av_log(ctx->log_ctx, AV_LOG_ERROR, "Failed to split AVCC PPS array.\n");
|
||||
return err;
|
||||
@@ -651,7 +653,8 @@ static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
|
||||
|
||||
err = ff_h2645_packet_split(&priv->read_packet,
|
||||
frag->data + start, end - start,
|
||||
ctx->log_ctx, 1, 2, AV_CODEC_ID_HEVC, 1, 1);
|
||||
ctx->log_ctx, 2, AV_CODEC_ID_HEVC,
|
||||
H2645_FLAG_IS_NALFF | H2645_FLAG_SMALL_PADDING | H2645_FLAG_USE_REF);
|
||||
if (err < 0) {
|
||||
av_log(ctx->log_ctx, AV_LOG_ERROR, "Failed to split "
|
||||
"HVCC array %d (%d NAL units of type %d).\n",
|
||||
@@ -721,7 +724,8 @@ static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
|
||||
|
||||
err = ff_h2645_packet_split(&priv->read_packet,
|
||||
frag->data + start, end - start,
|
||||
ctx->log_ctx, 1, 2, AV_CODEC_ID_VVC, 1, 1);
|
||||
ctx->log_ctx, 2, AV_CODEC_ID_VVC,
|
||||
H2645_FLAG_IS_NALFF | H2645_FLAG_SMALL_PADDING | H2645_FLAG_USE_REF);
|
||||
if (err < 0) {
|
||||
av_log(ctx->log_ctx, AV_LOG_ERROR, "Failed to split "
|
||||
"VVCC array %d (%d NAL units of type %d).\n",
|
||||
@@ -733,13 +737,14 @@ static int cbs_h2645_split_fragment(CodedBitstreamContext *ctx,
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
int flags = (H2645_FLAG_IS_NALFF * !!priv->mp4) | H2645_FLAG_SMALL_PADDING | H2645_FLAG_USE_REF;
|
||||
// Annex B, or later MP4 with already-known parameters.
|
||||
|
||||
err = ff_h2645_packet_split(&priv->read_packet,
|
||||
frag->data, frag->data_size,
|
||||
ctx->log_ctx,
|
||||
priv->mp4, priv->nal_length_size,
|
||||
codec_id, 1, 1);
|
||||
priv->nal_length_size,
|
||||
codec_id, flags);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user