| @@ -27,6 +27,7 @@ · 26 unmodified lines |
| 27 | #include "audio_frame_queue.h" | 27 | #include "audio_frame_queue.h" |
| 28 | #include "codec_internal.h" | 28 | #include "codec_internal.h" |
| 29 | #include "encode.h" | 29 | #include "encode.h" |
| | 30 | #include "internal.h" |
| 30 | | 31 | |
| 31 | typedef struct AptXEncContext { | 32 | typedef struct AptXEncContext { |
| 32 | AptXContext common; | 33 | AptXContext common; |
| @@ -259,6 +260,7 @@ static av_cold int aptx_encode_init(AVCodecContext *avctx) · 226 unmodified lines |
| 259 | | 260 | |
| 260 | if (!avctx->frame_size || avctx->frame_size % 4) | 261 | if (!avctx->frame_size || avctx->frame_size % 4) |
| 261 | avctx->frame_size = 1024; | 262 | avctx->frame_size = 1024; |
| | 263 | avctx->internal->pad_samples = 4; |
| 262 | | 264 | |
| 263 | return ff_aptx_init(avctx); | 265 | return ff_aptx_init(avctx); |
| 264 | } | 266 | } |
| @@ -269,7 +271,7 @@ const FFCodec ff_aptx_encoder = { · 4 unmodified lines |
| 269 | CODEC_LONG_NAME("aptX (Audio Processing Technology for Bluetooth)"), | 271 | CODEC_LONG_NAME("aptX (Audio Processing Technology for Bluetooth)"), |
| 270 | .p.type = AVMEDIA_TYPE_AUDIO, | 272 | .p.type = AVMEDIA_TYPE_AUDIO, |
| 271 | .p.id = AV_CODEC_ID_APTX, | 273 | .p.id = AV_CODEC_ID_APTX, |
| 272 | .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME, | 274 | .p.capabilities = AV_CODEC_CAP_DR1, |
| 273 | .priv_data_size = sizeof(AptXEncContext), | 275 | .priv_data_size = sizeof(AptXEncContext), |
| 274 | .init = aptx_encode_init, | 276 | .init = aptx_encode_init, |
| 275 | FF_CODEC_ENCODE_CB(aptx_encode_frame), | 277 | FF_CODEC_ENCODE_CB(aptx_encode_frame), |
| @@ -290,7 +292,7 @@ const FFCodec ff_aptx_hd_encoder = { · 14 unmodified lines |
| 290 | CODEC_LONG_NAME("aptX HD (Audio Processing Technology for Bluetooth)"), | 292 | CODEC_LONG_NAME("aptX HD (Audio Processing Technology for Bluetooth)"), |
| 291 | .p.type = AVMEDIA_TYPE_AUDIO, | 293 | .p.type = AVMEDIA_TYPE_AUDIO, |
| 292 | .p.id = AV_CODEC_ID_APTX_HD, | 294 | .p.id = AV_CODEC_ID_APTX_HD, |
| 293 | .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME, | 295 | .p.capabilities = AV_CODEC_CAP_DR1, |
| 294 | .priv_data_size = sizeof(AptXEncContext), | 296 | .priv_data_size = sizeof(AptXEncContext), |
| 295 | .init = aptx_encode_init, | 297 | .init = aptx_encode_init, |
| 296 | FF_CODEC_ENCODE_CB(aptx_encode_frame), | 298 | FF_CODEC_ENCODE_CB(aptx_encode_frame), |