mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
adxenc: change some data types
This commit is contained in:
parent
c98c6e18d8
commit
25edfc88e3
@ -33,7 +33,7 @@
|
|||||||
* adx2wav & wav2adx http://www.geocities.co.jp/Playtown/2004/
|
* adx2wav & wav2adx http://www.geocities.co.jp/Playtown/2004/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void adx_encode(ADXContext *c, unsigned char *adx, const short *wav,
|
static void adx_encode(ADXContext *c, uint8_t *adx, const int16_t *wav,
|
||||||
ADXChannelState *prev)
|
ADXChannelState *prev)
|
||||||
{
|
{
|
||||||
PutBitContext pb;
|
PutBitContext pb;
|
||||||
@ -76,7 +76,7 @@ static void adx_encode(ADXContext *c, unsigned char *adx, const short *wav,
|
|||||||
flush_put_bits(&pb);
|
flush_put_bits(&pb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int adx_encode_header(AVCodecContext *avctx,unsigned char *buf,size_t bufsize)
|
static int adx_encode_header(AVCodecContext *avctx, uint8_t *buf, int bufsize)
|
||||||
{
|
{
|
||||||
ADXContext *c = avctx->priv_data;
|
ADXContext *c = avctx->priv_data;
|
||||||
|
|
||||||
@ -121,9 +121,9 @@ static int adx_encode_frame(AVCodecContext *avctx,
|
|||||||
uint8_t *frame, int buf_size, void *data)
|
uint8_t *frame, int buf_size, void *data)
|
||||||
{
|
{
|
||||||
ADXContext *c = avctx->priv_data;
|
ADXContext *c = avctx->priv_data;
|
||||||
const short *samples = data;
|
const int16_t *samples = data;
|
||||||
unsigned char *dst = frame;
|
uint8_t *dst = frame;
|
||||||
int rest = avctx->frame_size;
|
int rest = avctx->frame_size;
|
||||||
|
|
||||||
if (!c->header_parsed) {
|
if (!c->header_parsed) {
|
||||||
int hdrsize = adx_encode_header(avctx,dst,buf_size);
|
int hdrsize = adx_encode_header(avctx,dst,buf_size);
|
||||||
@ -140,7 +140,7 @@ static int adx_encode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
while(rest>=32*2) {
|
while(rest>=32*2) {
|
||||||
short tmpbuf[32*2];
|
int16_t tmpbuf[32*2];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(i=0;i<32;i++) {
|
for(i=0;i<32;i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user