int32_t lpcqoffset;
} ShortenContext;
-static int shorten_decode_init(AVCodecContext * avctx)
+static av_cold int shorten_decode_init(AVCodecContext * avctx)
{
ShortenContext *s = avctx->priv_data;
s->avctx = avctx;
+ avctx->sample_fmt = SAMPLE_FMT_S16;
return 0;
}
static int shorten_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
- uint8_t *buf, int buf_size)
+ const uint8_t *buf, int buf_size)
{
ShortenContext *s = avctx->priv_data;
int i, input_buf_size = 0;
}
}
init_get_bits(&s->gb, buf, buf_size*8);
- get_bits(&s->gb, s->bitindex);
+ skip_bits(&s->gb, s->bitindex);
if (!s->blocksize)
{
int maxnlpc = 0;
s->lpcqoffset = V2LPCQOFFSET;
if (get_ur_golomb_shorten(&s->gb, FNSIZE) != FN_VERBATIM) {
- av_log(s->avctx, AV_LOG_ERROR, "missing verbatim section at begining of stream\n");
+ av_log(s->avctx, AV_LOG_ERROR, "missing verbatim section at beginning of stream\n");
return -1;
}
return i;
}
-static int shorten_decode_close(AVCodecContext *avctx)
+static av_cold int shorten_decode_close(AVCodecContext *avctx)
{
ShortenContext *s = avctx->priv_data;
int i;
shorten_decode_close,
shorten_decode_frame,
.flush= shorten_flush,
+ .long_name= NULL_IF_CONFIG_SMALL("Shorten"),
};