Lines Matching refs:avctx
30 static av_cold int ass_decode_init(AVCodecContext *avctx)
32 avctx->subtitle_header = av_malloc(avctx->extradata_size + 1);
33 if (!avctx->subtitle_header)
35 memcpy(avctx->subtitle_header, avctx->extradata, avctx->extradata_size);
36 avctx->subtitle_header[avctx->extradata_size] = 0;
37 avctx->subtitle_header_size = avctx->extradata_size;
38 avctx->priv_data = ff_ass_split(avctx->extradata);
39 if(!avctx->priv_data)
44 static int ass_decode_close(AVCodecContext *avctx)
46 ff_ass_split_free(avctx->priv_data);
47 avctx->priv_data = NULL;
52 static int ssa_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr,
60 ASSDialog *dialog = ff_ass_split_dialog(avctx->priv_data, ptr, 0, NULL);
87 static int ass_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr,
94 const int ts_start = av_rescale_q(avpkt->pts, avctx->time_base, ass_tb);
95 const int ts_duration = av_rescale_q(avpkt->duration, avctx->time_base, ass_tb);
103 av_log(avctx, AV_LOG_ERROR, "Invalid ASS packet\n");