avformat/utils: Inject global side data into first packet.

This fixes replaygain handling in ffplay and probably other applications.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/utils: factorize if()

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