lavc: add sample rate and channel layout to AVFrame.
Rationale is the same as for video width/height etc.
This commit is contained in:
@@ -356,6 +356,10 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
|
||||
else frame->pkt_pts = AV_NOPTS_VALUE;
|
||||
frame->reordered_opaque = avctx->reordered_opaque;
|
||||
|
||||
frame->sample_rate = avctx->sample_rate;
|
||||
frame->format = avctx->sample_fmt;
|
||||
frame->channel_layout = avctx->channel_layout;
|
||||
|
||||
if (avctx->debug & FF_DEBUG_BUFFERS)
|
||||
av_log(avctx, AV_LOG_DEBUG, "default_get_buffer called on frame %p, "
|
||||
"internal audio buffer used\n", frame);
|
||||
|
Reference in New Issue
Block a user