Marton Balint <cus <at> passwd.hu> writes: > + /* The purpose of this is demuxer is to detect DVB teletext > streams in > + * mpegts, so we reject invalid buffer sizes */ > + if ((p->buf_size + 45) % 184 != 0) > + return 0;
I don't think this is ok (although I may miss something): The file could end in the middle of a teletext patckage or the end of the probe buffer could be within a teletext package. > + if (!ff_data_identifier_is_teletext(p->buf[0])) > + return 0; > + > + for (buf = p->buf + 1; buf < end; buf += 46) { > + if (!ff_data_unit_id_is_teletext(buf[0]) && buf[0] != 0xff) > + return 0; > + if (buf[1] != 0x2c) // data_unit_length > + return 0; > + } I suspect this should count frames. > + return AVPROBE_SCORE_MAX / 2; Is this ok for one frame? > +++ b/libavutil/internal.h Please create a new teletext header in libavcodec. Thank you! Carl Eugen _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel