Rob Corddry is in talks for a role in comedy film 'Sex Tape'.

The 'Hot Tub Time Machine' actor would star alongside Jason Segel and Cameron Diaz, who play a married couple that make a sex tape in an effort to spice up their relationship, according to The Hollywood Reporter.

Corddry is set to play the couple's friend who helps them hunt for the illicit footage when it mysteriously disappears.

'Bad Teacher' director Jake Kasdan is set to begin filming 'Sex Tape' this autumn, with Todd Black, Jason Blumenthal and Steve Tisch lined up as producers.

Corddry is currently starring in 'The Way, Way Back', which premiered at the 2013 Sundance Film Festival, and he has just wrapped up filming sequel film 'Hot Tub Time Machine 2'.

This year he also appeared in vampire flick 'Warm Bodies', crime comedy 'Pain & Gain', and indie comedy 'In a World'.

Diaz was recently spotted filming scenes for 'The Other Woman' in New York City.

She previously starred alongside Segel in Kasdan's hit 2011 comedy 'Bad Teacher', which grossed more than $200 million.