plugins: Set keyframe flag on encoded audio packets

Not strictly necessary, and does not fix any bug. This just corrects a
nitpick that technically audio encoder packets are start points, but
that they aren't being labeled accordingly as keyframes.
This commit is contained in:
tt2468
2024-04-13 17:04:48 -07:00
committed by Lain
parent c0f71f002c
commit 8b6924b80f
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -775,6 +775,7 @@ static bool aac_encode(void *data, struct encoder_frame *frame,
packet->timebase_num = 1;
packet->timebase_den = (uint32_t)ca->samples_per_second;
packet->type = OBS_ENCODER_AUDIO;
packet->keyframe = true;
packet->size = out_desc.mDataByteSize;
packet->data = (uint8_t *)buffer_list.mBuffers[0].mData +
out_desc.mStartOffset;
@@ -442,6 +442,7 @@ static bool do_encode(struct enc_encoder *enc, struct encoder_packet *packet,
packet->data = enc->packet_buffer.array;
packet->size = avpacket.size;
packet->type = OBS_ENCODER_AUDIO;
packet->keyframe = true;
packet->timebase_num = 1;
packet->timebase_den = (int32_t)enc->context->sample_rate;
av_packet_unref(&avpacket);
+1
View File
@@ -273,6 +273,7 @@ static bool libfdk_encode(void *data, struct encoder_frame *frame,
packet->data = enc->packet_buffer;
packet->size = out_args.numOutBytes;
packet->type = OBS_ENCODER_AUDIO;
packet->keyframe = true;
packet->timebase_num = 1;
packet->timebase_den = enc->sample_rate;