avcodec/microdvddec: remove old compat code

This commit is contained in:
Clément Bœsch 2014-09-20 22:30:11 +02:00
parent 71f6275169
commit 180d7f330b

View File

@ -260,7 +260,6 @@ static int microdvd_decode_frame(AVCodecContext *avctx,
{ {
AVSubtitle *sub = data; AVSubtitle *sub = data;
AVBPrint new_line; AVBPrint new_line;
char c;
char *line = avpkt->data; char *line = avpkt->data;
char *end = avpkt->data + avpkt->size; char *end = avpkt->data + avpkt->size;
struct microdvd_tag tags[sizeof(MICRODVD_TAGS) - 1] = {{0}}; struct microdvd_tag tags[sizeof(MICRODVD_TAGS) - 1] = {{0}};
@ -268,15 +267,6 @@ static int microdvd_decode_frame(AVCodecContext *avctx,
if (avpkt->size <= 0) if (avpkt->size <= 0)
return avpkt->size; return avpkt->size;
/* To be removed later */
if (sscanf(line, "{%*d}{%*[0123456789]}%c", &c) == 1 &&
line[avpkt->size - 1] == '\n') {
av_log(avctx, AV_LOG_ERROR, "AVPacket is not clean (contains timing "
"information and a trailing line break). You need to upgrade "
"your libavformat or sanitize your packet.\n");
return AVERROR_INVALIDDATA;
}
av_bprint_init(&new_line, 0, 2048); av_bprint_init(&new_line, 0, 2048);
// subtitle content // subtitle content