|
|
|
@ -73,18 +73,10 @@ typedef struct PGSSubContext { |
|
|
|
|
int forced_subs_only; |
|
|
|
|
} PGSSubContext; |
|
|
|
|
|
|
|
|
|
static av_cold int init_decoder(AVCodecContext *avctx) |
|
|
|
|
static void flush_cache(AVCodecContext *avctx) |
|
|
|
|
{ |
|
|
|
|
avctx->pix_fmt = AV_PIX_FMT_PAL8; |
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static av_cold int close_decoder(AVCodecContext *avctx) |
|
|
|
|
{ |
|
|
|
|
uint16_t picture; |
|
|
|
|
|
|
|
|
|
PGSSubContext *ctx = avctx->priv_data; |
|
|
|
|
uint16_t picture; |
|
|
|
|
|
|
|
|
|
av_freep(&ctx->presentation.objects); |
|
|
|
|
ctx->presentation.object_count = 0; |
|
|
|
@ -93,6 +85,18 @@ static av_cold int close_decoder(AVCodecContext *avctx) |
|
|
|
|
av_freep(&ctx->pictures[picture].rle); |
|
|
|
|
ctx->pictures[picture].rle_buffer_size = 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static av_cold int init_decoder(AVCodecContext *avctx) |
|
|
|
|
{ |
|
|
|
|
avctx->pix_fmt = AV_PIX_FMT_PAL8; |
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static av_cold int close_decoder(AVCodecContext *avctx) |
|
|
|
|
{ |
|
|
|
|
flush_cache(avctx); |
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|