You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
vorbisenc: signal samples to skip
The encoder never actually signalled how many samples to skip. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
@@ -1218,6 +1218,14 @@ static int vorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
av_free(audio);
|
av_free(audio);
|
||||||
|
|
||||||
ff_af_queue_remove(&venc->afq, frame_size, &avpkt->pts, &avpkt->duration);
|
ff_af_queue_remove(&venc->afq, frame_size, &avpkt->pts, &avpkt->duration);
|
||||||
|
|
||||||
|
if (frame_size > avpkt->duration) {
|
||||||
|
uint8_t *side = av_packet_new_side_data(avpkt, AV_PKT_DATA_SKIP_SAMPLES, 10);
|
||||||
|
if (!side)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
AV_WL32(&side[4], frame_size - avpkt->duration);
|
||||||
|
}
|
||||||
|
|
||||||
*got_packet_ptr = 1;
|
*got_packet_ptr = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user