avformat/rtmppkt: Fix random crash

Fixes Ticket3564

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>