dvenc: dont fail hard if the timecode is invalid

Instead just dont store the timecode
Fixes Ticket2187

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-02-05 22:57:35 +01:00
parent b0635e2fcf
commit f0eacbc760
1 changed files with 2 additions and 2 deletions

View File

@ -376,8 +376,8 @@ static int dv_write_header(AVFormatContext *s)
break;
}
}
if (tcr)
return av_timecode_init_from_string(&dvc->tc, rate, tcr->value, s);
if (tcr && av_timecode_init_from_string(&dvc->tc, rate, tcr->value, s) >= 0)
return 0;
return av_timecode_init(&dvc->tc, rate, 0, 0, s);
}