Skip to content

Remove AV_CODEC_{CAP,FLAG}_TRUNCATED for FFmpeg 6 compatibility - #1254

Merged
flyingmutant merged 1 commit into
cmus:masterfrom
gavtroy:ffmpeg_truncated
Jul 8, 2023
Merged

flyingmutant merged 1 commit into
cmus:masterfrom
gavtroy:ffmpeg_truncated

Conversation

@gavtroy

@gavtroy gavtroy commented Apr 16, 2023

Copy link
Copy Markdown
Collaborator

Closes #1251

@pgaskin
pgaskin self-requested a review April 22, 2023 14:35
@brad0

brad0 commented Apr 28, 2023 •

Copy link
Copy Markdown

Or use

#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 18, 100)
		if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
			cc->flags |= AV_CODEC_FLAG_TRUNCATED;
#endif

For compatibility with older than 6 and 6+.

@gavtroy

gavtroy commented May 23, 2023

Copy link
Copy Markdown
Collaborator Author

Please correct me if you know more but I'd guess older versions are also fine with the flag not set. It's not clear why we were setting it or what it was supposed to do. It's not even clear if the flag was still relevant for the send_packet api. Of course it's not really explained anywhere so I don't know for sure.

@brad0

brad0 commented May 24, 2023

Copy link
Copy Markdown

https://git.videolan.org/?p=ffmpeg.git;a=commit;h=dd846bc4a9163f875cc2c4e99325c1a7b4ab8e7d

Looks like it might not have had any purpose with cmus being that it's an audio player and the flag only appears to have influenced (some) video codecs.

So this looks Ok as is after coming across that commit.

@pgaskin pgaskin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pgaskin

pgaskin commented Jul 8, 2023

Copy link
Copy Markdown
Member

@flyingmutant

@flyingmutant
flyingmutant merged commit 07ce2dc into cmus:master Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FFmpeg 6.0 compatibility fix

4 participants