Rationale is the same as for video width/height etc.
Unified · Split
| @@ -13,6 +13,9 @@ libavutil: 2011-04-18 · 12 unmodified lines | |||
| 13 | 13 | ||
| 14 | API changes, most recent first: | 14 | API changes, most recent first: |
| 15 | 15 | ||
| 16 | 2012-xx-xx - xxxxxxx - lavc 54.13.0 - avcodec.h | ||
| 17 | Add sample_rate and channel_layout fields to AVFrame. | ||
| 18 | |||
| 16 | 2012-xx-xx - xxxxxxx - lavr 0.0.1 | 19 | 2012-xx-xx - xxxxxxx - lavr 0.0.1 |
| 17 | Change AV_MIX_COEFF_TYPE_Q6 to AV_MIX_COEFF_TYPE_Q8. | 20 | Change AV_MIX_COEFF_TYPE_Q6 to AV_MIX_COEFF_TYPE_Q8. |
| 18 | 21 | ||
| @@ -1207,6 +1207,22 @@ typedef struct AVFrame { · 1206 unmodified lines | |||
| 1207 | * - decoding: Set by libavcodec. | 1207 | * - decoding: Set by libavcodec. |
| 1208 | */ | 1208 | */ |
| 1209 | uint8_t motion_subsample_log2; | 1209 | uint8_t motion_subsample_log2; |
| 1210 | |||
| 1211 | /** | ||
| 1212 | * Sample rate of the audio data. | ||
| 1213 | * | ||
| 1214 | * - encoding: unused | ||
| 1215 | * - decoding: set by get_buffer() | ||
| 1216 | */ | ||
| 1217 | int sample_rate; | ||
| 1218 | |||
| 1219 | /** | ||
| 1220 | * Channel layout of the audio data. | ||
| 1221 | * | ||
| 1222 | * - encoding: unused | ||
| 1223 | * - decoding: set by get_buffer() | ||
| 1224 | */ | ||
| 1225 | uint64_t channel_layout; | ||
| 1210 | } AVFrame; | 1226 | } AVFrame; |
| 1211 | 1227 | ||
| 1212 | struct AVCodecInternal; | 1228 | struct AVCodecInternal; |
| @@ -356,6 +356,10 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame) · 355 unmodified lines | |||
| 356 | else frame->pkt_pts = AV_NOPTS_VALUE; | 356 | else frame->pkt_pts = AV_NOPTS_VALUE; |
| 357 | frame->reordered_opaque = avctx->reordered_opaque; | 357 | frame->reordered_opaque = avctx->reordered_opaque; |
| 358 | 358 | ||
| 359 | frame->sample_rate = avctx->sample_rate; | ||
| 360 | frame->format = avctx->sample_fmt; | ||
| 361 | frame->channel_layout = avctx->channel_layout; | ||
| 362 | |||
| 359 | if (avctx->debug & FF_DEBUG_BUFFERS) | 363 | if (avctx->debug & FF_DEBUG_BUFFERS) |
| 360 | av_log(avctx, AV_LOG_DEBUG, "default_get_buffer called on frame %p, " | 364 | av_log(avctx, AV_LOG_DEBUG, "default_get_buffer called on frame %p, " |
| 361 | "internal audio buffer used\n", frame); | 365 | "internal audio buffer used\n", frame); |
| @@ -27,7 +27,7 @@ · 26 unmodified lines | |||
| 27 | */ | 27 | */ |
| 28 | 28 | ||
| 29 | #define LIBAVCODEC_VERSION_MAJOR 54 | 29 | #define LIBAVCODEC_VERSION_MAJOR 54 |
| 30 | #define LIBAVCODEC_VERSION_MINOR 12 | 30 | #define LIBAVCODEC_VERSION_MINOR 13 |
| 31 | #define LIBAVCODEC_VERSION_MICRO 0 | 31 | #define LIBAVCODEC_VERSION_MICRO 0 |
| 32 | 32 | ||
| 33 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | 33 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |