Skip to content
Snippets Groups Projects
Commit ba32c8df authored by Baptiste Coudurier's avatar Baptiste Coudurier
Browse files

skip run-in sequence during probe

Originally committed as revision 5876 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent eb9ab583
No related branches found
No related tags found
No related merge requests found
...@@ -919,14 +919,19 @@ static int mxf_read_close(AVFormatContext *s) ...@@ -919,14 +919,19 @@ static int mxf_read_close(AVFormatContext *s)
} }
static int mxf_probe(AVProbeData *p) { static int mxf_probe(AVProbeData *p) {
/* KLV packet describing MXF header partition pack */ uint8_t *bufp = p->buf;
uint8_t *end = p->buf + p->buf_size;
if (p->buf_size < sizeof(mxf_header_partition_pack_key)) if (p->buf_size < sizeof(mxf_header_partition_pack_key))
return 0; return 0;
if (IS_KLV_KEY(p->buf, mxf_header_partition_pack_key)) /* Must skip Run-In Sequence and search for MXF header partition pack key SMPTE 377M 5.5 */
return AVPROBE_SCORE_MAX; end -= sizeof(mxf_header_partition_pack_key);
else for (; bufp < end; bufp++) {
return 0; if (IS_KLV_KEY(bufp, mxf_header_partition_pack_key))
return AVPROBE_SCORE_MAX;
}
return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment