Fixes #1077 by adding check for empty streams (#1079)

This commit is contained in:
Artyom Fedoskin 2019-03-09 20:04:39 +01:00 committed by Carlos Fernandez Sanz
parent 9f308271b9
commit ab4f3d0d26

View File

@ -131,7 +131,8 @@ int get_best_stream(struct ccx_demuxer *ctx)
list_for_each_entry(iter, &ctx->cinfo_tree.all_stream, all_stream, struct cap_info)
{
if(iter->codec == CCX_CODEC_ATSC_CC)
// If saw_pesstart is 0 then stream doesn't have payload. Helps against empty streams
if(iter->codec == CCX_CODEC_ATSC_CC && iter->saw_pesstart)
return iter->pid;
}