* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/intmath.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
+#include "mathops.h"
#define ROQ_FRAME_SIZE 735
#define ROQ_HEADER_SIZE 8
{
ROQDPCMContext *context = avctx->priv_data;
-#if FF_API_OLD_ENCODE_AUDIO
- av_freep(&avctx->coded_frame);
-#endif
av_freep(&context->frame_buffer);
return 0;
context->lastSample[0] = context->lastSample[1] = 0;
-#if FF_API_OLD_ENCODE_AUDIO
- avctx->coded_frame= avcodec_alloc_frame();
- if (!avctx->coded_frame) {
- ret = AVERROR(ENOMEM);
- goto error;
- }
-#endif
-
return 0;
error:
roq_dpcm_encode_close(avctx);
AVCodec ff_roq_dpcm_encoder = {
.name = "roq_dpcm",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ROQ_DPCM,
+ .id = AV_CODEC_ID_ROQ_DPCM,
.priv_data_size = sizeof(ROQDPCMContext),
.init = roq_dpcm_encode_init,
.encode2 = roq_dpcm_encode_frame,