-typedef struct PTXContext {
- AVFrame picture;
-} PTXContext;
-
-static av_cold int ptx_init(AVCodecContext *avctx) {
- PTXContext *s = avctx->priv_data;
-
- avcodec_get_frame_defaults(&s->picture);
- avctx->coded_frame= &s->picture;
-
- return 0;
-}
-
-static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
- const uint8_t *buf, int buf_size) {
- PTXContext * const s = avctx->priv_data;
- AVFrame *picture = data;
- AVFrame * const p = &s->picture;
+static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
+ AVPacket *avpkt) {
+ const uint8_t *buf = avpkt->data;
+ const uint8_t *buf_end = avpkt->data + avpkt->size;
+ AVFrame * const p = data;