'Thor' Post-Credits, Brought to You by… Joss Whedon?

[caption id="attachment_49571" align="alignleft" width="300" caption="Marvel Studios"][/caption]

That's right. Joss Whedon—the man currently directing Marvel's mega-superhero flick "The Avengers"— had actually already gotten some practice with this action-packed genre before setting foot on set.

How, you ask?

It turns out that Whedon directed the post-credits sequence for "Thor," which involved Stellan Skarsgard and Samuel L. Jackson, Collider reports.

Skarsgard revealed that this ending was shot only a few months ago. And with the release date fast approaching, "Thor" director Kenneth Branagh was tied up with post-production work on the film.

So Whedon, who was probably drowning in "Avengers" prep and eager to get behind the camera, stepped in.

Isn't it nice when things just work out?

Hopefully all of Whedon's hard work will pay off. But with a cast that includes Robert Downey Jr., Chris Hemsworth, Samuel L. Jackson and Scarlett Johansson (to name but a few), it's hard to imagine it won't.

"The Avengers" flies into theaters May 4 2012.