-
Notifications
You must be signed in to change notification settings - Fork 258
upgrade to ffmpeg 8 #688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
upgrade to ffmpeg 8 #688
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -719,7 +719,7 @@ private void StreamInitialize() | |||||||||||||
| } | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| ffmpeg.av_format_inject_global_side_data(InputContext); | ||||||||||||||
| // ffmpeg.av_format_inject_global_side_data(InputContext); | ||||||||||||||
|
|
||||||||||||||
| // This is useful for file formats with no headers such as MPEG. This function also computes | ||||||||||||||
| // the real frame-rate in case of MPEG-2 repeat frame mode. | ||||||||||||||
|
|
@@ -822,7 +822,7 @@ private void StreamInitializeInputContext() | |||||||||||||
| // InputContext->flags |= opts.FlagKeepSideData ? ffmpeg.AVFMT_FLAG_KEEP_SIDE_DATA : InputContext->flags; | ||||||||||||||
| InputContext->flags |= opts.FlagNoBuffer ? ffmpeg.AVFMT_FLAG_NOBUFFER : InputContext->flags; | ||||||||||||||
| InputContext->flags |= opts.FlagSortDts ? ffmpeg.AVFMT_FLAG_SORT_DTS : InputContext->flags; | ||||||||||||||
| InputContext->flags |= opts.FlagStopAtShortest ? ffmpeg.AVFMT_FLAG_SHORTEST : InputContext->flags; | ||||||||||||||
| ////InputContext->flags |= opts.FlagStopAtShortest ? ffmpeg.AVFMT_FLAG_SHORTEST : InputContext->flags; | ||||||||||||||
|
zgabi marked this conversation as resolved.
|
||||||||||||||
| ////InputContext->flags |= opts.FlagStopAtShortest ? ffmpeg.AVFMT_FLAG_SHORTEST : InputContext->flags; | |
| // NOTE: AVFMT_FLAG_SHORTEST is no longer supported in FFmpeg 8+. | |
| // The DemuxerGlobalOptions.FlagStopAtShortest option is kept for backward compatibility | |
| // but is currently a no-op and does not modify InputContext->flags. |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The packet size is being stored in the opaque field as a workaround for the deprecated pkt_size field. However, there's no documentation explaining this workaround pattern or any validation that the opaque field isn't already being used for another purpose. Consider adding a comment explaining that this is a workaround for the removed pkt_size field in FFmpeg 8, and verify that opaque is not used elsewhere in a conflicting way.
| readPacket.Pointer->opaque = (void*)readPacket.Pointer->size; | |
| // FFmpeg 8 removed AVPacket.pkt_size. As a workaround, store the packet size | |
| // in AVPacket.opaque for later retrieval, but only if opaque is not already | |
| // being used for some other purpose. | |
| if (readPacket.Pointer->opaque == null) | |
| readPacket.Pointer->opaque = (void*)readPacket.Pointer->size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The av_format_inject_global_side_data call has been commented out instead of being properly removed or documented. If this function is removed in FFmpeg 8 and no longer needed, the comment should explain why it's safe to remove. If it's been replaced by an alternative approach, that should be documented here.