lavc: add sample rate and channel layout to AVFrame.

Rationale is the same as for video width/height etc.
This commit is contained in:
Anton Khirnov
2012-05-04 19:12:31 +02:00
parent 37f4a976b3
commit 828bd088f3
4 changed files with 24 additions and 1 deletions

View File

@@ -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);