From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v4 1/3] avformat/flvdec: support enhanced flv PacketTypeMetadata
Date: Sat, 2 Mar 2024 11:25:11 -0300
Message-ID: <c6521226-74b3-48f7-8b14-450d5d4030eb@gmail.com> (raw)
In-Reply-To: <tencent_8843049BFE0DB3928C8F032176C4DD2DE605@qq.com>
On 3/2/2024 5:51 AM, zhupengfei via ffmpeg-devel wrote:
> @@ -1100,8 +1262,17 @@ retry:
>               video_codec_id = avio_rb32(s->pb);
>               size -= 4;
>           }
> -        if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_VIDEO_INFO_CMD)
> +
> +        if (enhanced_flv && stream_type == FLV_STREAM_TYPE_VIDEO && (flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_VIDEO_INFO_CMD) {
> +            type = flags & 0x0F;
> +            if (type == PacketTypeMetadata) {
warning: comparison between 'enum FlvTagType' and 'enum <anonymous>' 
[-Wenum-compare]
I changed it locally to use a new packet_type variable in this scope.
Will apply the set soon if no one objects.
> +                int ret = flv_parse_video_color_info(s, st, next);
> +                av_log(s, AV_LOG_DEBUG, "enhanced flv parse metadata ret %d and skip\n", ret);
> +            }
> +            goto skip;
> +        } else if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_VIDEO_INFO_CMD) {
>               goto skip;
> +        }
>       } else if (type == FLV_TAG_TYPE_META) {
>           stream_type=FLV_STREAM_TYPE_SUBTITLE;
>           if (size > 13 + 1 + 4) { // Header-type metadata stuff
> @@ -1287,6 +1458,11 @@ retry_duration:
>               goto leave;
>           }
>   
> +        if (enhanced_flv && stream_type == FLV_STREAM_TYPE_VIDEO && flv->meta_color_info_flag) {
> +            flv_update_video_color_info(s, st); // update av packet side data
> +            flv->meta_color_info_flag = 0;
> +        }
> +
>           if (st->codecpar->codec_id == AV_CODEC_ID_H264 || st->codecpar->codec_id == AV_CODEC_ID_MPEG4 ||
>               (st->codecpar->codec_id == AV_CODEC_ID_HEVC && type == PacketTypeCodedFrames)) {
>               // sign extension
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply	other threads:[~2024-03-02 14:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 14:40 [FFmpeg-devel] [PATCH 2/2] " zhupengfei via ffmpeg-devel
2023-12-04 21:32 ` James Almer
2023-12-13 13:41   ` 朱鹏飞 via ffmpeg-devel
2023-12-17 16:24   ` [FFmpeg-devel] [PATCH v2 1/2] avformat/flvenc: " zhupengfei via ffmpeg-devel
2023-12-17 18:22     ` James Almer
2023-12-21 13:46       ` zhupengfei via ffmpeg-devel
2023-12-17 16:24   ` [FFmpeg-devel] [PATCH v2 2/2] avformat/flvdec: " zhupengfei via ffmpeg-devel
2024-01-11 16:15   ` [FFmpeg-devel] [PATCH v3 1/2] " zhupengfei via ffmpeg-devel
2024-01-11 16:17   ` [FFmpeg-devel] [PATCH v3 2/2] avformat/flvenc: " zhupengfei via ffmpeg-devel
2024-01-11 16:37   ` zhupengfei via ffmpeg-devel
2024-03-02  8:51   ` [FFmpeg-devel] [PATCH v4 1/3] avformat/flvdec: " zhupengfei via ffmpeg-devel
2024-03-02 14:25     ` James Almer [this message]
2024-03-02 15:05     ` Andreas Rheinhardt
2024-03-02  8:51   ` [FFmpeg-devel] [PATCH v4 2/3] avformat/flvenc: " zhupengfei via ffmpeg-devel
2024-03-02 14:59     ` Andreas Rheinhardt
2024-03-03  3:33       ` zhupengfei via ffmpeg-devel
2024-03-02  8:51   ` [FFmpeg-devel] [PATCH v4 3/3] fate/flvenc: " zhupengfei via ffmpeg-devel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=c6521226-74b3-48f7-8b14-450d5d4030eb@gmail.com \
    --to=jamrial@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git