From: Zhao Zhili <quinkblack-at-foxmail.com@ffmpeg.org> To: ffmpeg-devel@ffmpeg.org Cc: Zhao Zhili <zhilizhao@tencent.com> Subject: [FFmpeg-devel] [PATCH 4/6] avcodec/packet: Add AV_PKT_FLAG_NEW_SEQUENCE flag Date: Tue, 18 Mar 2025 20:58:47 +0800 Message-ID: <tencent_49CEB3E54C3305284753E7536795D6A90405@qq.com> (raw) From: Zhao Zhili <zhilizhao@tencent.com> Sometimes AV_PKT_FLAG_KEY is the start of a new sequence, sometimes it's not. For example, HEVC CRA NALU can be marked as keyframe. hevc decoder doesn't check AV_PKT_FLAG_KEY, and doesn't treat CRA as new sequence. But sometimes CRA is really the start of a new sequence, and the decoder should flush all pictures out, e.g., after a rewind by mp4 editlist. AV_PKT_FLAG_KEY works with no problem for seek, AV_PKT_FLAG_NEW_SEQUENCE works for rewind inside demuxer, that is, no explicit flush on decoder. --- libavcodec/packet.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/packet.h b/libavcodec/packet.h index c1f1ad7b43..331c66d7aa 100644 --- a/libavcodec/packet.h +++ b/libavcodec/packet.h @@ -612,6 +612,16 @@ typedef struct AVPacketList { */ #define AV_PKT_FLAG_DISPOSABLE 0x0010 +/** + * Flag is used to indicate the start of a new sequence. + * + * For example, HEVC CRA can be handled differently depending on whether it's + * the start of a new sequence or not. + * + * A new sequence can be created by timeline map in mp4 editlist. + */ +#define AV_PKT_FLAG_NEW_SEQUENCE 0x0020 + enum AVSideDataParamChangeFlags { AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004, AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008, -- 2.46.0 _______________________________________________ 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".
reply other threads:[~2025-03-18 12:59 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=tencent_49CEB3E54C3305284753E7536795D6A90405@qq.com \ --to=quinkblack-at-foxmail.com@ffmpeg.org \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=zhilizhao@tencent.com \ /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