mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/subviewerdec: remove old compat code
This commit is contained in:
parent
180d7f330b
commit
5ec90c90c6
|
@ -50,20 +50,11 @@ static int subviewer_event_to_ass(AVBPrint *buf, const char *p)
|
||||||
static int subviewer_decode_frame(AVCodecContext *avctx,
|
static int subviewer_decode_frame(AVCodecContext *avctx,
|
||||||
void *data, int *got_sub_ptr, AVPacket *avpkt)
|
void *data, int *got_sub_ptr, AVPacket *avpkt)
|
||||||
{
|
{
|
||||||
char c;
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
AVSubtitle *sub = data;
|
AVSubtitle *sub = data;
|
||||||
const char *ptr = avpkt->data;
|
const char *ptr = avpkt->data;
|
||||||
AVBPrint buf;
|
AVBPrint buf;
|
||||||
|
|
||||||
/* To be removed later */
|
|
||||||
if (ptr && sscanf(ptr, "%*u:%*u:%*u.%*u,%*u:%*u:%*u.%*u%c", &c) == 1) {
|
|
||||||
av_log(avctx, AV_LOG_ERROR, "AVPacket is not clean (contains timing "
|
|
||||||
"information). You need to upgrade your libavformat or "
|
|
||||||
"sanitize your packet.\n");
|
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
}
|
|
||||||
|
|
||||||
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
|
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
|
||||||
// note: no need to rescale pts & duration since they are in the same
|
// note: no need to rescale pts & duration since they are in the same
|
||||||
// timebase as ASS (1/100)
|
// timebase as ASS (1/100)
|
||||||
|
|
Loading…
Reference in New Issue