History

lavc: use a separate field for exporting audio encoder padding

Currently, the amount of padding inserted at the beginning by some audio encoders, is exported through AVCodecContext.delay. However - the term 'delay' is heavily overloaded and can have multiple different meanings even in the case of audio encoding. - this field has entirely different meanings, depending on whether the codec context is used for encoding or decoding (and has yet another different meaning for video), preventing generic handling of the codec context. Therefore, add a new field -- AVCodecContext.initial_padding. It could conceivably be used for decoding as well at a later point.

Anton Khirnov committed 12 years ago

Commit 2df0c321 parent c80a81622 files · +63 −40Browse files

Showing the changes to libavcodec/audio_frame_queue.c (1 of 22 files). Show all

Unified · Split

libavcodec/audio_frame_queue.c+2−2
@@ -29,8 +29,8 @@ av_cold void ff_af_queue_init(AVCodecContext *avctx, AudioFrameQueue *afq) · 28 unmodified lines
2929 {
3030 afq->avctx = avctx;
3131 afq->next_pts = AV_NOPTS_VALUE;
32− afq->remaining_delay = avctx->delay;
33− afq->remaining_samples = avctx->delay;
32+ afq->remaining_delay = avctx->initial_padding;
33+ afq->remaining_samples = avctx->initial_padding;
3434 afq->frame_queue = NULL;
3535 }
3636

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t