mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-21 12:49:40 +08:00
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:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user