Commit 8a312f8d authored by oggk's avatar oggk
Browse files

Warn, instead of asserting, when a stream has nothing to index.

This can happen when encoding part of a video with subtitles,
if no subtitles are present in the encoded segment.

parent b3939097
......@@ -533,8 +533,12 @@ write_index_pages (seek_index* index,
int index_bytes = 0;
int keypoints_cutoff = 0;
/* Must have indexed keypoints. */
assert(index->max_keypoints > 0 && index->packet_num > 0);
/* Must have indexed keypoints to go on */
if (index->max_keypoints == 0 || index->packet_num == 0) {
fprintf(stderr, "WARNING: no key points for %s stream %08x\n", name, serialno);
return 0;
}
/* Must have placeholder packet to rewrite. */
assert(index->page_location > 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment