lavf/utils: avoid decoding a frame to get the codec parameters