mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/encode: Set AV_PKT_FLAG_KEY based upon AV_CODEC_PROP_INTRA_ONLY
Currently, the AV_PKT_FLAG_KEY is automatically set for audio encoders; yet this is wrong, as both MLP and TrueHD have non-keyframes. So set it based upon AV_CODEC_PROP_INTRA_ONLY (from the corresponding AVCodecDescriptor) instead. This also sets it for some video codecs, which is intended. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
f09fd1c6c7
commit
3f11eac757
2 changed files with 10 additions and 4 deletions
|
|
@ -153,6 +153,13 @@ typedef struct AVCodecInternal {
|
|||
uint8_t *byte_buffer;
|
||||
unsigned int byte_buffer_size;
|
||||
|
||||
/**
|
||||
* This is set to AV_PKT_FLAG_KEY for encoders that encode intra-only
|
||||
* formats (i.e. whose codec descriptor has AV_CODEC_PROP_INTRA_ONLY set).
|
||||
* This is used to set said flag generically for said encoders.
|
||||
*/
|
||||
int intra_only_flag;
|
||||
|
||||
void *frame_thread_encoder;
|
||||
|
||||
EncodeSimpleContext es;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue